Skip to content

Instantly share code, notes, and snippets.

View OlivierJM's full-sized avatar

ojm OlivierJM

View GitHub Profile
Country Tariffs Charged to the U.S.A. U.S.A. Discounted Reciprocal Tariffs
Afghanistan 49% 10%
Antigua and Barbuda 10% 10%
Argentina 10% 10%
Aruba 10% 10%
Australia 10% 10%
Bangladesh 74% 37%
Barbados 10% 10%
Benin 10% 10%
Bermuda 10% 10%

cloc

$ cloc count lines of code.

Use as: $ cloc ./ or $ cloc ./*.py

convert

$ convert convert .gif or .mp4 to many png frames

Use as: $ convert -coalesce my_animatedfile.gif my_pngfiles.png

@copleykj
copleykj / useReactiveQuery.ts
Last active January 8, 2022 23:14
Grapher Hooks
import { useState, useEffect, useRef } from 'react';
import { useTracker } from 'meteor/react-meteor-data';
import { Grapher } from 'meteor/cultofcoders:grapher';
import { Meteor } from 'meteor/meteor';
interface QueryInfo<T> {
loading: boolean
ready: boolean
data: T[]
error: Meteor.Error | null
@dhh
dhh / Gemfile
Created June 24, 2020 22:23
HEY's Gemfile
ruby '2.7.1'
gem 'rails', github: 'rails/rails'
gem 'tzinfo-data', '>= 1.2016.7' # Don't rely on OSX/Linux timezone data
# Action Text
gem 'actiontext', github: 'basecamp/actiontext', ref: 'okra'
gem 'okra', github: 'basecamp/okra'
# Drivers
@JacksonChen666
JacksonChen666 / Join Zoom.scpt
Last active December 8, 2023 22:30
Join zoom at the speed of computers (AppleScript)
# It is recommended that you save this script as an application, so you don't have to open Script editor.
(*
It all started when I wanted to join zoom faster than a human could do with no prompt like how I expected like this.
I first discovered zoom.us's URL scheme to join meeting, but when I found out it doesn't work, I started to make this program.
After this all of stuff, I finally have something that is constantly updated.
After this pandemic is over, development might slow down or become discontinued.
*)
global meetingNames, meetingIDs, meetingPwds, wname
# Compiling the app will reset all your saved meetings!
property meetingNames : {}
@romainl
romainl / Don't use Vim.md
Last active April 29, 2025 07:22
Don't use Vim for the wrong reasons

Don't use Vim

Don't do the crime, if you can't do the time.

-- Anthony Vincenzo "Tony" Baretta

Vim is an amazing text editor. I love it. Really, I wouldn't [organize][organize] a Vim advent calendar if I didn't. But, as amazing as it is, Vim is not for everyone. It can't solve all your problems, or be a TUI version of your favorite IDE, or make you a better programmer, or land you that dream job in the Bay Area. But Vim can help you be more mindful, focused, and efficient, as long as you approach it with the right mindset.

Don't get me wrong, I certainly welcome you to try Vim, but I'm not a proselyte. I don't thrive on newbies. I just want you to use the right tool for the job and not waste your—and anyone's—time on a fruitless quest.

@agmm
agmm / nextjs-file-upload-api.js
Created January 31, 2020 23:03
Simple Nextjs File Upload — Backend API
// Backend
import formidable from 'formidable';
export const config = {
api: {
bodyParser: false,
},
};
export default async (req, res) => {
@antfu
antfu / 📊 Weekly development breakdown
Last active November 20, 2023 10:25
📊 Weekly development breakdown
TypeScript 21 hrs 47 mins ████████████████▒░░░ 67.1%
Vue.js 6 hrs 21 mins ██████▓░░░░░░░░░░░░░ 19.6%
JSON 2 hrs 10 mins ████▒░░░░░░░░░░░░░░░ 6.7%
JavaScript 46 mins ███▒░░░░░░░░░░░░░░░░ 2.4%