Skip to content

Instantly share code, notes, and snippets.

View CyJimmy264's full-sized avatar
๐Ÿ’š

Maksim Veynberg CyJimmy264

๐Ÿ’š
View GitHub Profile
@CyJimmy264
CyJimmy264 / openssl_files_encrypt_decrypt.sh
Created June 7, 2018 06:18
openssl files encrypt/decrypt
##########################
# Small files
##########################
# convert pub key to pem.pub format
ssh-keygen -f ~/.ssh/id_rsa.pub -e -m PKCS8 > id_rsa.pem.pub
# inverse
ssh-keygen -f id_rsa.pem.pub -i -m PKCS8
# encrypt small files
@CyJimmy264
CyJimmy264 / screenlapser.sh
Created March 9, 2018 10:25
Screenlapser with scrot and mencoder
#!/usr/bin/env zsh
write_avi() {
mencoder -ovc x264 -mf w=1400:h=900:fps=20:type=jpg \
"mf://@screenlapser-$atimeout.txt" \
-o screenlapse-`date +%Y-%m-%d-%H-%M-%S`.avi
xargs rm < screenlapser-$atimeout.txt
rm screenlapser-$atimeout.txt
}
trap 'atimeout=$timeout; write_avi; trap - INT; kill -INT $$' INT
@CyJimmy264
CyJimmy264 / v8js.sh
Created January 18, 2018 11:48 — forked from igez/v8js.sh
Install V8js php extension on ubuntu
#!/bin/bash
sudo apt-get update -o Acquire::ForceIPv4=true
sudo apt-get install -y build-essential chrpath git -o Acquire::ForceIPv4=true
cd /tmp
git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git
export PATH=`pwd`/depot_tools:"$PATH"
@CyJimmy264
CyJimmy264 / .gitconfig
Created December 6, 2017 10:38
.gitconfig [credential]
[credential]
helper = cache --socket=$XDG_RUNTIME_DIR/git/credentials/socket.$XDG_SESSION_ID --timeout=2592000
@CyJimmy264
CyJimmy264 / rtl8723ae.conf
Created November 24, 2017 18:53
wifi module options (dir: /etc/modprobe.d/)
options rtl8723ae swenc=1 fwlps=0
# ips=0 msi=0 swlps=0
# from sysfsutils:
# systool -a -v -m rtl8723ae | grep -A8 "Parameters:"
@CyJimmy264
CyJimmy264 / drop_tables
Created September 24, 2014 07:15
Drop all tables that start with some prefix
SELECT
CONCAT(
"DROP TABLE ",
GROUP_CONCAT(
CONCAT(TABLE_NAME, "\n")
)
) AS stmt
FROM information_schema.TABLES
WHERE TABLE_SCHEMA = "DatabaseName" AND TABLE_NAME LIKE "prefix_%"