Skip to content

Instantly share code, notes, and snippets.

View init.vim
" 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 Mar 17, 2019
Use Neovim as git mergetool
View .gitconfig
[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 Sep 16, 2018
Open TCP ports in HSE Dormitory 1
View ports.txt
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 Aug 16, 2018 — forked from alexellis/timelapse.md
ffmpeg time-lapse
View timelapse.md

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

@nikhilw
nikhilw / toggleMicOneLiner.sh
Last active May 5, 2020
Toggle mic on-off on a Ubuntu / Linux Mint machine with a keyboard shortcut
View toggleMicOneLiner.sh
#! /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 Jul 9, 2021
Node.js ponyfill for atob and btoa encoding functions
View atob.js
module.exports = function atob(a) {
return new Buffer(a, 'base64').toString('binary');
};
@vsemozhetbyt
vsemozhetbyt / js.nomenclature.web.fx.chains.txt
Last active Oct 29, 2020
JavaScript Nomenclature Mozilla Firefox Nightly 52.0a1 (2016-10-17) (chains)
View js.nomenclature.web.fx.chains.txt
window
window["alert"]
window["alert"]["length"]
window["alert"]["name"]
window["AnalyserNode"]
window["AnalyserNode"]["length"]
window["AnalyserNode"]["name"]
window["AnalyserNode"]["prototype"]
window["AnalyserNode"]["prototype"]["constructor"]
window["AnalyserNode"]["prototype"]["fftSize"]
@vsemozhetbyt
vsemozhetbyt / nomenclature.js
Last active Jan 22, 2019
JavaScript Nomenclature
View nomenclature.js
/******************************************************************************/
'use strict';
/******************************************************************************/
const nomenclatureTerms = new Set();
const nomenclatureChains = new Set();
const globs = new Map();
const processedObjects = new Set();
/******************************************************************************/
if (typeof window !== 'undefined') {
@joepie91
joepie91 / vpn.md
Last active Jan 23, 2022
Don't use VPN services.
View vpn.md

Don't use VPN services.

No, seriously, don't. You're probably reading this because you've asked what VPN service to use, and this is the answer.

Note: The content in this post does not apply to using VPN for their intended purpose; that is, as a virtual private (internal) network. It only applies to using it as a glorified proxy, which is what every third-party "VPN provider" does.

  • A Russian translation of this article can be found here, contributed by Timur Demin.
  • A Turkish translation can be found here, contributed by agyild.
  • There's also this article about VPN services, which is honestly better written (and has more cat pictures!) than my article.
@jaydenseric
jaydenseric / ffmpeg-web-video-guide.md
Last active Jan 13, 2022
A quick guide to using FFmpeg to create cross-device web videos.
View ffmpeg-web-video-guide.md

Video conversion with FFmpeg

Install

On mac:

  1. Download the latest release.
  2. Extract the binary and place it in /usr/local/bin.

Command basics