Skip to content

Instantly share code, notes, and snippets.

@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') {
@chjj
chjj / trans.sh
Created November 6, 2011 04:44
setting transparency from bash
#!/bin/bash
# transset in a bash script
# copyright (c) 2011, christopher jeffrey
# usage:
# by window id
#trans -w "$WINDOWID" -o 75
# by name
#trans -n "urxvt" -o 75
@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

@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"]
@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
@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')
@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"
@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.
@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]
@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