Nick | PSN handle |
---|---|
denis | denizb |
eric | aatland |
espen | fooobaar |
Flums | Flumsen |
jonas | Zergnomen |
norvald | norvald |
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
_status_init() { | |
_status_line=$(tput lines) | |
echo -ne "\e[s\e[1;$[_status_line-1]r\e[u" | |
} | |
_status_set() { | |
[ -z "$_status_line" ] && _status_init | |
_status_data="$(echo -ne "\e[s\e[$_status_line;1H\e[1;44;36m[\e[37m$(date +%H:%M)\e[36m][\e[37mstatus...\e[36m]\e[K\e[u")" | |
} | |
_add_prompt_cmd _status_set 99 |
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/sh | |
PATH=/usr/sbin:/usr/bin:/sbin:/bin | |
gw=$(route -A inet -n|awk '/UG/{ print $2 }') | |
ok= | |
if [ -n "$gw" ]; then | |
ping -c 1 $gw >& /dev/null && ok=1 | |
fi |
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
sub encode_header { | |
my $charset = lc $_[0]; | |
my $encoding = lc $_[1]; | |
my $text = $_[2]; | |
my @ret; | |
my $pre = "=?$charset?$encoding?"; | |
my $suf = "?="; | |
my $max = 75 - length($pre) - length($suf); |
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 | |
if [ -z "$1" ]; then | |
echo "please supply at least one server to connect to" >&2 | |
exit 1 | |
fi | |
target=multi-ssh-$$ | |
if [ -z "$TMUX" ]; 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
#! /usr/bin/perl | |
use JSON; | |
use WWW::Mechanize; | |
my $mech = WWW::Mechanize->new(); | |
my $what = shift; | |
my($user,$repo); |
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 | |
# | |
# Usage in ~/.ssh_config, usefull RPi defaults: | |
# | |
# Match exec "ether-match %h 'b8:27:eb:*'" | |
# User pi | |
# ForwardX11 no | |
# CheckHostIP no | |
# StrictHostKeyChecking no |
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 | |
use strict; | |
use Term::ReadKey; | |
my $pass = shift; | |
unless ($pass) { | |
$| = 1; |
I hereby claim:
- I am pstray on github.
- I am pstray (https://keybase.io/pstray) on keybase.
- I have a public key whose fingerprint is 1AFB EC29 9C6F BD24 0127 B844 A659 284C D70F 3912
To claim this, I am signing this object:
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
(defun my:auto-file-mode () | |
(when (save-excursion | |
(save-restriction | |
(widen) | |
(goto-char (point-min)) | |
(save-match-data | |
(looking-at "^#!")))) | |
(let* ((cmode (file-modes buffer-file-name)) | |
(nmode (logior cmode (lsh (logand cmode #o444) -2)))) | |
(when (not (= cmode nmode)) |
OlderNewer