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
<!DOCTYPE html> | |
<html manifest="iv.appcache"> | |
<head> | |
<title>IV</title> | |
<meta charset="utf-8" /> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no"> | |
<meta name="apple-mobile-web-app-capable" content="yes"> | |
<meta name="apple-mobile-web-app-status-bar-style" content="black"> | |
<link rel="shortcut icon" type="image/x-icon" href="iv-57x57.png" /> | |
<link rel="apple-touch-icon" href="iv-57x57.png"> |
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
# On OSX | |
ping -p d0d0 | |
# On linux | |
iptables -I INPUT -i eth0 -p icmp -m u32 --u32 "6&0xFF=1 && 4&0x1FFF=0 && 0>>22&0x3C@16=0xD0D0D0D0" -j LOG --log-prefix "paf" |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
platform = require('os').platform() | |
fs = require 'fs' | |
webcams = [] | |
detect_linux = -> | |
devices = fs.readdirSync '/sys/class/video4linux' | |
for video in devices | |
data = fs.readFileSync "/sys/class/video4linux/#{video}/name", "utf-8" | |
webcams.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
tail -F /var/log/apache2/access.log | grep --line-buffered "\[500" | while read line | |
do | |
echo "$line" | |
echo "$line" | mail -s "HTTP 500" "tech@localhost" | |
done |
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/sh | |
GNOPTIONS="-n growlssh -a SSHKeychain.app -t ssh -s" | |
sudo tail -F /var/log/secure.log \ | |
| grep --line-buffered 'ssh' \ | |
| grep --line-buffered -v 'Kerberos' \ | |
| xargs -I {} growlnotify $GNOPTIONS -m "{}" |
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
_makefile_targets() { | |
local cur opts | |
cur="${COMP_WORDS[COMP_CWORD]}" | |
opts=$(grep "^[[:alnum:]-]*:" Makefile | cut -d: -f 1 | tr "\n" " ") | |
COMPREPLY=( $(compgen -W "${opts}" ${cur}) ) | |
return 0 | |
} | |
complete -F _makefile_targets make |
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
<?php | |
/** | |
* A very simple benchmark timer. | |
* | |
* Return a closure wich embed init and last call timestamps. | |
* | |
* Each call of that closure push to error log the filename, | |
* milliseconds since init, milliseconds since last call | |
* and free label given in parameters. |
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
defaults delete com.googlecode.iterm2 HotKeyBookmark | |
defaults write com.googlecode.iterm2 Hotkey 1 | |
defaults write com.googlecode.iterm2 HotkeyChar 32 | |
defaults write com.googlecode.iterm2 HotkeyCode 49 | |
defaults write com.googlecode.iterm2 HotkeyModifiers 1048840 |
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
<?php | |
/** | |
* Growl for quick debug/scripts, for serious business see | |
* https://github.com/tylerhall/php-growl/ | |
*/ | |
function growl( $text ) { | |
$val = false; | |
$str = sprintf( |
NewerOlder