Skip to content

Instantly share code, notes, and snippets.

@rxw1
rxw1 / org.asdflabs.screenbla.plist
Last active October 25, 2016 17:16 — forked from joostrijneveld/scpscreenshots.sh
Upload Screenshot – Get Link
<!--
OS X launchd plist: Copy to ~/Library/LaunchAgents
and launch with launchctl load ~/Library/LaunchAgents/org.asdflabs.screenbla.plist.
Make sure the path to the shell script is correct.
-->
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
@staltz
staltz / introrx.md
Last active May 12, 2025 23:22
The introduction to Reactive Programming you've been missing
@Yago
Yago / hack-passwd.sh
Created January 29, 2014 13:28
Hack - Hack local machine
# install
$ brew install cmake
$ brew install libssh
$ brew install hydra
$ brew install nmap
$ ping 192.168.1.255
$ nmap -A 192.168.0.8
$ hydra -l User -P '/path/to/wordlist.txt' 192.168.0.8 ssh
@placek
placek / example.sh
Created July 29, 2013 11:09
Shell useful hacks
# searching through files content in current directory, not in .git subdir
find . -type f -not -path ".git" -exec grep --color -Hn "hello" {} \;
# VoIP
# reciever
nc -l -p 12345 | aplay
# sender
aplay | nc 192.168.0.2 12345
# view the file while it is still updating
@peter
peter / rack-rest-api-example.rb
Created January 31, 2013 19:06
An example of how to write a simple JSON REST API with a simplistic router directly on top of Rack (i.e. without the use of a framework like Sinatra).
#################################################################
#
# File: lib/api.rb
#
#################################################################
require 'user' # ActiveRecord model
# Connect to the db
ActiveRecord::Base.establish_connection(ENV['DATABASE_URL'])
@acook
acook / keypress.rb
Created December 2, 2012 18:42
Read keypresses from user in terminal, including arrow keys using pure Ruby. This has since been folded into a much more robust gem called Remedy. https://rubygems.org/gems/remedy & https://github.com/acook/remedy
require 'io/console'
# Reads keypresses from the user including 2 and 3 escape character sequences.
def read_char
STDIN.echo = false
STDIN.raw!
input = STDIN.getc.chr
if input == "\e" then
input << STDIN.read_nonblock(3) rescue nil