Skip to content

Instantly share code, notes, and snippets.

View yuradmt's full-sized avatar
🎯
Focusing

Yura Sherman yuradmt

🎯
Focusing
View GitHub Profile
@yuradmt
yuradmt / affiliate_rewrite.md
Last active May 31, 2017 04:45
Nginx: rewrite /recommends affiliate link cloaking to a different cloaking template

Based on Stack Overflow

rewrite ^(/recommends/)(.*)$   /go/$2 permanent;
@yuradmt
yuradmt / gist:e6af74e15597f2550f3485a2306752b5
Created June 12, 2017 02:50
tracklisting with running times (for youtube)
"""
create running time for tracks in an album
1. song A 02:20
2. song B 01:30
3. song C 04:00
=>
1. song A 00:00
2. song B 02:20
3. song C 03:50
"""
@yuradmt
yuradmt / audio2youtube.md
Last active June 12, 2017 14:19
create a video out of an mp3 and an image

ffmpeg -loop 1 -r 2 -i image.jpg -i input.mp3 -vf scale=-1:720 -c:v libx264 -preset slow -tune stillimage -crf 18 -c:a copy -shortest -pix_fmt yuv420p -threads 0 output.mkv

@yuradmt
yuradmt / puzzlesolv.py
Created June 18, 2017 14:55
puzzle solve: a/bc+d/fe+g/hi = 1 , each letter represents a digit 1-9
"""
find a solution for a/bc + d/fe + g/hi = 1 where each letter represents
a unique digit
"""
import itertools
import math
for perm in itertools.permutations([1, 2, 3, 4, 5, 6, 7, 8, 9]):
perm = [float(x) for x in perm]
Verifying my Blockstack ID is secured with the address 1AazSMGN4wxmQPncnNf7UL3oXcokQxVGEL https://explorer.blockstack.org/address/1AazSMGN4wxmQPncnNf7UL3oXcokQxVGEL

Keybase proof

I hereby claim:

  • I am borxes on github.
  • I am yuradmt (https://keybase.io/yuradmt) on keybase.
  • I have a public key whose fingerprint is FD03 6B7E 3B3F 6EAD EFD1 992B 25DB ABE3 A2F2 5AA2

To claim this, I am signing this object:

@yuradmt
yuradmt / airbnb-style-react.md
Last active September 27, 2019 13:11
Using AirBnb style guide with React
  1. yarn add eslint prettier eslint-plugin-prettier eslint-config-prettier eslint-plugin-react eslint-plugin-react-hooks

  2. npx install-peerdeps --dev eslint-config-airbnb

  3. eslint --init

  4. In .eslintrc.json:

{
@yuradmt
yuradmt / eslint_prettier_airbnb.md
Last active October 25, 2019 15:02 — forked from bradtraversy/eslint_prettier_airbnb.md
ESLint, Prettier & Airbnb Setup

VSCode - ESLint, Prettier & Airbnb Setup

1. Install ESLint & Prettier extensions for VSCode

Optional - Set format on save and any global prettier options

2. Install Packages

npm i -D eslint prettier eslint-plugin-prettier eslint-config-prettier eslint-plugin-node eslint-config-node
const getManyUsers = async (ids) => {
const USERS = {
1: { name: "foo" },
2: { name: "bar" }
};
return ids.map(id => USERS[id] || null);
}
function createLoader(getMany) {
@yuradmt
yuradmt / iterm2-solarized.md
Created June 6, 2020 11:34 — forked from kevin-smets/iterm2-solarized.md
iTerm2 + Oh My Zsh + Solarized color scheme + Source Code Pro Powerline + Font Awesome + [Powerlevel10k] - (macOS)

Default

Default

Powerlevel10k

Powerlevel10k