This file contains hidden or 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
{ | |
"server":"xx.xx.xx.xx", | |
"server_port": 1234, | |
"local_port": 1234, | |
"password":"long-non-guessable-password", | |
"timeout": 600, | |
"method":"chacha20-ietf-poly1305" | |
} |
This file contains hidden or 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
var http = require('http'); | |
var postOptions = { | |
hostname: 'localhost', | |
port: '8090', | |
method: 'POST', | |
path: '/api' | |
headers: { | |
'Content-Type': 'application/json' | |
} |
This file contains hidden or 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 | |
# a - add to archive | |
# -mx0 - copy only | |
# -v250m - makes split of 250 MB of each files | |
#7z a <new_name>.7z -mx0 -v250m <intermediate_name>.7z | |
# set the minimum size in bytes (here: 100mb) | |
minimumSize=100000000 | |
for i in *.7z; do |
This file contains hidden or 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
[alias] | |
random = !"git commit -am \"$(echo $(curl -s http://whatthecommit.com/index.txt))\"; git pull --rebase; git push" |
This file contains hidden or 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
" http://stackoverflow.com/questions/234564/tab-key-4-spaces-and-auto-indent-after-curly-braces-in-vim | |
filetype plugin indent on | |
" show existing tab with 4 spaces width | |
set tabstop=4 | |
" when indenting with '>', use 4 spaces width | |
set shiftwidth=4 | |
" On pressing tab, insert 4 spaces | |
set expandtab |
This file contains hidden or 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 | |
pacmd list-sinks | |
#will show all of the available audio outputs | |
pacmd list-sink-inputs | |
#will list all programs that are currently playing music and |
This file contains hidden or 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 | |
# Run with the command: `./deploy.sh live go` | |
$SERVER_IP="xx.xx.xx.xx" | |
$ERRORSTRING="Error. Please make sure you've indicated correct parameters" | |
cd ./public | |
if [ $# -eq 0 ] | |
then | |
echo $ERRORSTRING; | |
elif [ $1 == "live" ] |
This file contains hidden or 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
# dnf install --nogpgcheck http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm http://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm | |
# dnf install unrar cabextract p7zip-plugins ncompress xz-lzma-compat | |
extract() { | |
if [ -z "$1" ]; then | |
# display usage if no parameters given | |
echo "Usage: extract <path/file_name>.<zip|rar|bz2|gz|tar|tbz2|tgz|Z|7z|xz|ex|tar.bz2|tar.gz|tar.xz>" | |
echo " extract <path/file_name_1.ext> [path/file_name_2.ext] [path/file_name_3.ext]" | |
return 1 | |
else |
This file contains hidden or 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
rungo() { | |
gccgo -c $1 | |
file="${1%%.*}" | |
gccgo -o $file ($file).o | |
./$file | |
rm -f $file | |
rm -f ($file).o | |
} |
This file contains hidden or 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
# http://zsh.sourceforge.net/Doc/Release/Prompt-Expansion.html | |
PS1=$'\n$(git_prompt_info)%{$fg[cyan]%}%/\n${ret_status}%{$reset_color%}' |