Skip to content

Instantly share code, notes, and snippets.

View jarfil's full-sized avatar

Jaroslaw Filiochowski jarfil

View GitHub Profile
@jarfil
jarfil / setaliases.sh
Created January 1, 2015 09:34
Cygwin aliases
### 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")" $*
@jarfil
jarfil / frees.sh
Created July 24, 2014 20:56
Free space from all devices
#!/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() {
@jarfil
jarfil / netstatp.pl
Last active August 29, 2015 14:04
Netstat listening sockets by processess
#!/usr/bin/perl
# get data
@net = `netstat -naptu`;
@ps = `ps xa`;
sort @net;
sort @ps;
$pid_offset = index($net[1], 'PID/');
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()
@jarfil
jarfil / .tmux.conf
Created June 17, 2014 18:18
tmux configuration: screen, vi, blue
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 '%%'"
@jarfil
jarfil / GoiWinMove.ahk
Last active August 29, 2015 14:02
Guns of Icarus: Multi-monitor center window, Auto-fire with OSD
#SingleInstance force
;////////////
;// Hotkeys
^!F8::
WinGetActiveTitle, WActiveTitle
CenterWindow(WActiveTitle)
return