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
wireshark-on () { | |
SERVER=$1 | |
shift | |
if [ $# -gt 0 ] | |
then | |
FILTER="$@" | |
else | |
FILTER="not tcp port ssh" | |
fi | |
wireshark -k -i <(ssh $SERVER $WIRESHARK_SUDO tcpdump -i any -s 0 -w - "$FILTER") |
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
require "set" | |
def all_chars_in_file(file) | |
all_chars = Set.new | |
File.open(file).each_line do |line| | |
line.chars.inject(all_chars) { |s,c| s << c } | |
end | |
all_chars | |
end |
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
gem 'libvncclient-ruby', :require => 'libvnc', :git => 'git@github.com:zweitag/libvncclient-ruby.git' |
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
var Markdown; | |
if (typeof exports === "object" && typeof require === "function") // we're in a CommonJS (e.g. Node.js) module | |
Markdown = exports; | |
else | |
Markdown = {}; | |
// The following text is included for historical reasons, but should | |
// be taken with a pinch of salt; it's not all true anymore. |
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
require 'json' | |
require 'json/generic_object' | |
JSON.parse '{"json_class":"JSON::GenericObject", "foo":"bar"}' | |
# => #<JSON::GenericObject foo="bar"> |
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
# Start SSH session on first available server | |
task :ssh do | |
hostname = find_servers_for_task(current_task).first | |
exec %Q|ssh -l #{user} #{hostname} -t '#{default_shell}'| | |
end | |
# Start Rails console on first available server | |
namespace :rails do | |
task :console, :roles => :app do | |
hostname = find_servers_for_task(current_task).first |
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
require 'pry' | |
class FooBar | |
def hello | |
puts "world!" | |
end | |
end | |
puts Pry::WrappedModule.new(FooBar).source | |
# => "class FooBar\n def hello\n puts \"world!\"\n end\nend\n" |
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
# Activate vim mode | |
bindkey -v | |
bindkey "^e" emacs-editing-mode | |
# Map history backward search (Ctrl-R in emacs mode) to [command-mode]? | |
bindkey -M vicmd '?' history-incremental-search-backward | |
# Present a nice prompt | |
vim_ins_mode="%{%F{white}%}⎆" | |
vim_cmd_mode="%{%F{red}%}⌘" |
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
U-Boot 1.1.3 (Nov 18 2012 - 20:35:15) | |
Board: Ralink APSoC DRAM: 32 MB | |
relocate_code Pointer at: 81fb4000 | |
spi_wait_nsec: 42 | |
spi device id: ef 40 17 0 0 (40170000) | |
find flash: W25Q64BV | |
raspi_read: from:20000 len:1000 | |
.raspi_read: from:20000 len:1000 | |
.============================================ |
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
# OpenWRT build config for LogiLink WC0030A IP camera | |
# Automatically generated file; DO NOT EDIT. | |
# OpenWrt Configuration | |
# | |
CONFIG_MODULES=y | |
CONFIG_HAVE_DOT_CONFIG=y | |
# CONFIG_TARGET_ppc44x is not set | |
# CONFIG_TARGET_realview is not set | |
# CONFIG_TARGET_arm64 is not set | |
# CONFIG_TARGET_sunxi is not set |
OlderNewer