Skip to content

Instantly share code, notes, and snippets.

@expo-lux
expo-lux / .vimrc
Created September 25, 2021 17:41 — forked from dragonken/.vimrc
YAML space indent for vim
syntax on
filetype plugin indent on
"Get the 2-space YAML as the default when hit carriage return after the colon
autocmd FileType yaml setlocal ts=2 sts=2 sw=2 expandtab
хз за что отвечают следующие настройки:
-----------------------------------
set is hlsearch ai ic scs
nnoremap <esc><esc> :nohls<cr>
@expo-lux
expo-lux / markdown-cheatsheet.md
Created March 13, 2020 06:02 — forked from jonschlinkert/markdown-cheatsheet.md
A better markdown cheatsheet.
@expo-lux
expo-lux / PyPlugTelegramBot.py
Created June 30, 2019 09:26 — forked from aleeraser/PyPlugTelegramBot.py
Example for controlling PyPlug's ESP32 with a Telegram bot.
import urequests
SSID = '[ENTER_SSID]'
PSW = '[ENTER_PASSWORD]'
CONNECTION_TIMEOUT = 10000 # milliseconds
READ_TIMEOUT = 1000 # milliseconds
TOKEN = '345342414:AAEwdKYs87fAJLPovD4f5k31yXnflnYFs54'
userChatId = None
@expo-lux
expo-lux / gist:109dfe8287291d6a0cb1156d3764c280
Last active March 5, 2019 09:16 — forked from ymotongpoo/gist:1342656
extract AAC audio from flv, and convert aac to mp3 using ffmpeg
ffmpeg -i input.m4a output.wav
ffmpeg -i input-video.avi -vn -acodec copy output-audio.aac
# using libfaac on Mac OS X 10.6.8
# -vn : not copying video
# -acodec : specify codec used in flv file
# -ac : channels. 1 is for mono, 2 is for stereo
# -ab : specify bitrate for output file (note that rate is not kbps but bps)
# -ar : sampling frequency (Hz)
@expo-lux
expo-lux / gist:4d4f45c8357c1a47bcabe428805b8315
Created September 2, 2018 16:45 — forked from EvilFaeton/gist:2886922
Simulate heavy load CPU and IO on Linux
# CPU
for cpu in 1 2 ; do
( while true; do true; done ) &
done
# IO
for cpu in 1 2 ; do
( while true; do find / -type f -exec cp {} /dev/null \; ; done ) &
done