Skip to content

Instantly share code, notes, and snippets.

@teidesu
teidesu / baza76.js
Created October 17, 2022 15:25
hex и base64? нет, блин, НЁХ и БАЗА76
// не бейте за кринж код, писала на коленке по фану
const HEX_ALPHABET = '0123456789абвгде'
const B76_ALPHABET =
'АБВГДЕЁЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдеёжзийклмнопрстуфхцчшщъыьэюя0123456789'
function toНёх(buf) {
let ret = ''
for (let i = 0; i < buf.length; i++) {
const byte = buf[i]
@hatkidchan
hatkidchan / proxytest.py
Created May 16, 2022 23:24
Proxy checker
#!/usr/bin/env python3
import asyncio
import string
import random
from typing import Union, TypeVar, Tuple
from httpx import AsyncClient
from httpx_socks import AsyncProxyTransport
Result = TypeVar('Result')
" Specify a directory for plugins
call plug#begin('~/.vim/plugged')
Plug 'neoclide/coc.nvim', {'branch': 'release'}
Plug 'scrooloose/nerdtree'
"Plug 'tsony-tsonev/nerdtree-git-plugin'
Plug 'Xuyuanp/nerdtree-git-plugin'
Plug 'tiagofumo/vim-nerdtree-syntax-highlight'
Plug 'ryanoasis/vim-devicons'
Plug 'airblade/vim-gitgutter'
@dteoh
dteoh / .gitconfig
Created March 17, 2019 23:40
Use Neovim as git mergetool
[merge]
tool = vimdiff
[mergetool]
keepBackup = false
[mergetool "vimdiff"]
cmd = nvim -d $LOCAL $REMOTE $MERGED -c '$wincmd w' -c 'wincmd J'
@petuhovskiy
petuhovskiy / ports.txt
Created September 16, 2018 13:33
Open TCP ports in HSE Dormitory 1
success on port 110
success on port 465
success on port 51
success on port 53
success on port 993
success on port 995
success on port 443
success on port 194
success on port 50
success on port 2048
@travm
travm / timelapse.md
Created August 16, 2018 14:21 — forked from alexellis/timelapse.md
ffmpeg time-lapse

Convert sequence of JPEG images to MP4 video

ffmpeg -r 24 -pattern_type glob -i '*.JPG' -i DSC_%04d.JPG -s hd1080 -vcodec libx264 timelapse.mp4

  • -r 24 - output frame rate
  • -pattern_type glob -i '*.JPG' - all JPG files in the current directory
  • -i DSC_%04d.JPG - e.g. DSC_0397.JPG
  • -s hd1080 - 1920x1080 resolution

Slower, better quality

@elgamine-dev
elgamine-dev / gist:1784f2cbc0b81f21ff20a7c3062f7265
Last active November 3, 2022 22:36 — forked from garbados/gist:f82604ea639e0e47bf44
Falsehoods Programmers Believe About Gender
  1. There are two and only two genders.
  2. Okay, then there are two and only two biological genders.
  3. Gender is determined solely by biology.
  4. Okay, it’s mostly determined by biology, right?
  5. Please tell me it’s determined by DNA.
  6. Gender can be reliably determined through visual means. After all, no man would ever wear a burka.
  7. Once gender is set, it never changes.
  8. Even if the gender can change, it will only change from the one value to the other value.
  9. Only one gender can be “active” at the same time.
  10. We’re tracking gender now, so we’ve always tracked it.
@Theldus
Theldus / cue_to_flac.py
Created February 18, 2018 01:10 — forked from bancek/cue_to_mp3.py
CUE splitter using ffmpeg (to flac)
cue_file = 'file.cue'
d = open(cue_file).read().splitlines()
general = {}
tracks = []
current_file = None
@nikhilw
nikhilw / toggleMicOneLiner.sh
Last active August 10, 2022 08:08
Toggle mic on-off on a Ubuntu / Linux Mint machine with a keyboard shortcut
#! /bin/sh
# static icon, easier to set as a bash alias or directly use as a single command instead of creating a script file.
amixer set Capture toggle | gawk 'match($0, /Front Left.*\[(.*)\]/, a) {print a[1]}' | xargs notify-send --hint=int:transient:1 -i "audio-input-microphone" "Mic switched: $1"
@jmshal
jmshal / atob.js
Last active April 27, 2024 04:12
Node.js ponyfill for atob and btoa encoding functions
module.exports = function atob(a) {
return new Buffer(a, 'base64').toString('binary');
};