Skip to content

Instantly share code, notes, and snippets.

@jaydenseric
jaydenseric / ffmpeg-web-video-guide.md
Last active February 17, 2024 23:49
A quick guide to using FFmpeg to create cross-device web videos.

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

@joepie91
joepie91 / vpn.md
Last active May 1, 2024 01:04
Don't use VPN services.

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.
@vsemozhetbyt
vsemozhetbyt / nomenclature.js
Last active January 22, 2019 18:05
JavaScript Nomenclature
/******************************************************************************/
'use strict';
/******************************************************************************/
const nomenclatureTerms = new Set();
const nomenclatureChains = new Set();
const globs = new Map();
const processedObjects = new Set();
/******************************************************************************/
if (typeof window !== 'undefined') {
@vsemozhetbyt
vsemozhetbyt / js.nomenclature.web.fx.chains.txt
Last active October 29, 2020 18:46
JavaScript Nomenclature Mozilla Firefox Nightly 52.0a1 (2016-10-17) (chains)
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"]
@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');
};
@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"
@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
@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.
@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

@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