This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
echo $(( ($(date --date="031122" +%s) - $(date --date="021020" +%s) )/(60*60*24) )) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# see: http://blog.tomtung.com/2009/11/cowsay-fortune | |
# http://www.commandlinefu.com/commands/view/3584/remove-color-codes-special-characters-with-sed | |
# https://github.com/busyloop/lolcat | |
# https://github.com/dorentus/mruby-lolcat-bin | |
# | |
# requires `fortune`, `cowsay`, | |
# and ruby gem `lolcat` or its mruby version equivalent | |
export LANG="en_US.UTF-8" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"theme": "dark", | |
"autoUpdate": false, | |
"snippet": { | |
"expanded": true, | |
"newSnippetPrivate": false, | |
"sorting": "updated_at", | |
"sortingReverse": true | |
}, | |
"editor" : { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
wgetod() { | |
NSLASH="$(echo "$1" | perl -pe 's|.*://[^/]+(.*?)/?$|\1|' | grep -o / | wc -l)" | |
NCUT=$((NSLASH > 0 ? NSLASH-1 : 0)) | |
wget -r -nH --user-agent=Mozilla/5.0 --cut-dirs=$NCUT --no-parent --reject="index.html*" "$1" | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ffmpeg -i input.mp4 -i soundtrack.mp3 -filter_complex "[1:a]afade=t=out:st=$(bc <<< "$duration-$fade"):d=$fade[a]" -map 0:v:0 -map "[a]" -c:v copy -c:a aac -shortest with_audio.mp4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# core {{{ | |
[core] | |
editor = /usr/bin/vim | |
excludesfile = /Users/np/.gitignore_global | |
pager=less -x4 | |
#}}} | |
# user {{{ | |
[user] | |
email = [email protected] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[user] | |
email = [email protected] | |
name = Firstname Lastname | |
[alias] | |
# basic | |
st = status -s | |
cl = clone | |
ci = commit | |
co = checkout |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Run this in the same directory as the Hangouts.json file generated by Google Takeout / Data Export tool. | |
# python3 hangouts.py | |
import json | |
import datetime | |
import os | |
import shutil | |
import re | |
chat_dir = "hangouts" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
docker run -v ghunt-resources:/usr/src/app/resources -ti mxrch/ghunt hunt.py <email> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
defaults -currentHost write -g AppleFontSmoothing -int [0/1/2/3] | |
# default is 2, 0 disabled |