Skip to content

Instantly share code, notes, and snippets.

@czottmann
czottmann / gist:660914
Created November 3, 2010 09:46
Tunnel IRC via external machine
ssh -NfL 6667:irc.redsrc.com:6667 [email protected]
# then connect to localhost:6667
@heavensrevenge
heavensrevenge / gist:712735
Created November 23, 2010 23:09
Bookmarklets
javascript:function tinycc_bookmarklet(){var script=document.createElement('script');script.src='http://tiny.cc/public/javascript/bookmarklet.js';scriptObj=document.body.appendChild(script);}tinycc_bookmarklet();
javascript:void(window.open('http://3.ly/?bm=1&u='+encodeURIComponent(location.href)))
javascript:(function(){var%20d=document,w=window,e=w.getSelection,k=d.getSelection,x=d.selection,s=(e?e():(k)?k():(x?x.createRange().text:0)),f='http://identi.ca//index.php?action=bookmarklet',l=d.location,e=encodeURIComponent,g=f+'&status_textarea=%E2%80%9C'+((e(s))?e(s):e(document.title))+'%E2%80%9D%20%E2%80%94%20'+e(l.href);function%20a(){if(!w.open(g,'t','toolbar=0,resizable=0,scrollbars=1,status=1,width=450,height=200')){l.href=g;}}a();})()
javascript:var t=((window.getSelection&&window.getSelection())||(document.getSelection&&document.getSelection())||(document.selection&&document.selection.createRange&&document.selection.createRange().text));var e=(document.charset||document.characterSet);if(t!=''){location.
@ngs
ngs / wget.js
Created May 14, 2012 07:14
wget gb rom txt
// http://gamecenter.grantgalitz.org/
var opts = $$("#dropdown_select option"); for(var i=0,cmd=[],val;i<opts.length;val=opts[i++].value){ if(/.+\.gbc?$/.test(val))cmd.push("wget http://gamecenter.grantgalitz.org/romStorage/"+val+".txt") }; cmd.join("\n");
@svemir
svemir / README.md
Created December 4, 2012 18:44 — forked from paxan/gist:3901864
A Common Crawl Experiment

A Common Crawl Experiment

Introduction

At my company, we are building infrastructure that enables us to perform computations involving large bodies of text data.

To get familiar with the tech involved, I started with a simple experiment: using [Common Crawl metadata corpus][1], count crawled URLs grouped by top level domain (TLD).

@jfalco
jfalco / irc-connect
Created December 16, 2012 16:01
irc-connect
#!/bin/bash
# If we get an argument, use it for ssh port, otherwise use default of 22
if [ -n "$1" ]
then
port=$1
else
port=22
fi
@matchy256
matchy256 / web_alive.sh
Last active July 24, 2018 15:51
wget を使った Web 死活監視スクリプト
#!/bin/bash
if [ $# -eq 2 ]; then
URL=$1
MAILTO=$2
else
echo "usage : $0 check_url alert_mail_address"
exit 1
fi
@sente
sente / JSTOR_liberator.js
Last active April 28, 2016 15:01
On Monday afternoon, a group of online archivists released the "Aaron Swartz Memorial JSTOR Liberator." The initiative is a JavaScript-based bookmarklet that lets Internet users "liberate" an article, already in the public domain, from the online academic archive JSTOR. By running the script—which is limited to once per browser—a public domain a…
/**
*
* Base64 encode / decode
* http://www.webtoolkit.info/
*
**/
var Base64 = {
// private property
@bojanbjelic
bojanbjelic / spider-urls.sh
Created February 14, 2013 10:37
spider unique URLs on pages, starting from one URL
wget --spider --force-html -r -l1 http://tigar.ir.ttweb.net/ 2>&1 | grep '^--' | awk '{ print $3 }' | grep -v '\.\(css\|txt\|png\|gif\|jpg\|js\)$' | sort --unique
@ramn
ramn / irc_from_bash.sh
Last active May 10, 2017 16:46
IRC client in Bash
# Communicate with an IRC channel from the shell
#
# Runs in background, writes messages to stdout in tty
# Depends on sic
TMPF=ircsession.tmp; CHAN='#testircfrombash'; ME=bot001; cat /dev/null > $TMPF; (tail -f $TMPF | sic -h irc.freenode.net -p 6667 -n $ME | while read MSG; do case "$MSG" in "$ME"*) echo ":j $CHAN" >> $TMPF;; "$CHAN"*) echo "$MSG";; esac; done;) &
# Then, to write to the channel:
echo "Hello all!" >> $TMPF
# or open a buffer to write many rows:
@yckart
yckart / README.md
Last active October 30, 2016 19:04
rawgit.com / rawgithub.com - Bookmarklet

A simple bookmarklet which makes our painful life a bit easier.

javascript:(function(b,a,c,d,e){if(/\.\w+$/.test(a))b.location=c+a.replace("/blob/","/");else if(e=prompt("Insert a filename:","index.html"))b.location=c+a.replace("/tree/","/")+(~a.indexOf(d)?"/":d)+e})(window,location.pathname,"http://rawgit.com","/master/");

The usage is quite simple:

Go to any repo where you like to preview a file, and execute the booklet. If the current url is a file, it should open the file directly, otherwise it will prompt for a filename (per default it is index.html).