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
#SingleInstance force | |
;//////////// | |
;// Hotkeys | |
^!F8:: | |
WinGetActiveTitle, WActiveTitle | |
CenterWindow(WActiveTitle) | |
return |
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
set-option -g prefix C-a | |
unbind-key C-b | |
bind-key C-a send-prefix | |
set-option -g status-style bg=blue | |
set-option -g mode-keys vi | |
bind R source-file ~/.tmux.conf | |
bind + command-prompt "join-pane -t '%%'" |
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
# to be called from ~/.bashrc or similar | |
# don't apply changes if not logging in from given IP | |
### IP restriction | |
#if [ "${SSH_CLIENT//`dig +short fractal.jarfil.net`/}" != "$SSH_CLIENT" ] ; then | |
export PS1='[$( | |
if [ "a${USER:-${USERNAME:-$(whoami)}}" == aroot ] ; then | |
echo "\[\e[01;31m\]" | |
elif [[ "${GROUPS[@]}" =~ (^| )(114|544)( |$) ]] ; then |
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
import socket | |
from BaseHTTPServer import HTTPServer | |
from SimpleHTTPServer import SimpleHTTPRequestHandler | |
class MyHandler(SimpleHTTPRequestHandler): | |
def do_GET(self): | |
if self.path == '/ip': | |
self.send_response(200) | |
self.send_header('Content-type', 'text/html') | |
self.end_headers() |
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 | |
fecho() { | |
local c | |
c=`perl -e "print ' ' x(15-${#1}) ; print $1"` | |
c=`echo "$c" | sed "s/\([^.]\{3\}\)/\1./g;s/\.\$//"` | |
echo -n "${c// ./ }" | |
} | |
tprint() { |
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
#!/usr/bin/perl | |
# get data | |
@net = `netstat -naptu`; | |
@ps = `ps xa`; | |
sort @net; | |
sort @ps; | |
$pid_offset = index($net[1], 'PID/'); |
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
#!/usr/bin/awk -E | |
BEGIN { | |
if ( ARGV[1] == "" ) { | |
print "Usage: grep-block <regexp> [file1 file2 ...]" | |
exit | |
} | |
search = ARGV[1] | |
print "-" search "-" | |
ARGV[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
### CYGWIN | |
# Sublime Text 3 | |
# https://cygwin.com/cygwin-ug-net/using-effectively.html | |
# https://scotch.io/tutorials/open-sublime-text-from-the-command-line-using-subl-exe-windows | |
# https://stackoverflow.com/questions/7131670/make-bash-alias-that-takes-parameter | |
sublimetext() { | |
"C:/Program Files/Sublime Text 3/subl.exe" "$(cygpath -pw "$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
#!/bin/bash | |
# painting2sprites - A simple script to read an ORA, resize and trim output PNGs. | |
INPUT_FILE="$1" | |
OUTPUT_DIR="$2" | |
RESIZE_SCALE="25%" | |
if [ "$2" == "" ]; then |
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 | |
PKG="$1" | |
for f in stable testing unstable experimental ; do | |
echo -n "$f - " | |
apt-cache show $PKG/$f 2>/dev/null | grep "Version:" || echo | |
done |
OlderNewer