Skip to content

Instantly share code, notes, and snippets.

@jakeonrails
jakeonrails / Ruby Notepad Bookmarklet
Created January 29, 2013 18:08
This bookmarklet gives you a code editor in your browser with a single click.
data:text/html, <style type="text/css">#e{position:absolute;top:0;right:0;bottom:0;left:0;}</style><div id="e"></div><script src="http://d1n0x3qji82z53.cloudfront.net/src-min-noconflict/ace.js" type="text/javascript" charset="utf-8"></script><script>var e=ace.edit("e");e.setTheme("ace/theme/monokai");e.getSession().setMode("ace/mode/ruby");</script>
@rcoup
rcoup / rsync_parallel.sh
Created April 10, 2013 21:52
Parallel-ise an rsync transfer when you want multiple concurrent transfers happening,
#!/bin/bash
set -e
# Usage:
# rsync_parallel.sh [--parallel=N] [rsync args...]
#
# Options:
# --parallel=N Use N parallel processes for transfer. Defaults to 10.
#
# Notes:
@willurd
willurd / web-servers.md
Last active July 12, 2025 15:04
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000
@spiculator
spiculator / rsync-3.0.6-sleepflag.patch
Created June 12, 2013 08:25
make rsync sleep every 10 seconds
diff -Naur rsync-3.0.6/Makefile.in rsync-3.0.6-sleepflag/Makefile.in
--- rsync-3.0.6/Makefile.in 2009-04-11 03:24:49.000000000 +0400
+++ rsync-3.0.6-sleepflag/Makefile.in 2010-08-05 22:05:32.000000000 +0400
@@ -35,7 +35,7 @@
OBJS1=flist.o rsync.o generator.o receiver.o cleanup.o sender.o exclude.o \
util.o main.o checksum.o match.o syscall.o log.o backup.o
OBJS2=options.o io.o compat.o hlink.o token.o uidlist.o socket.o hashtable.o \
- fileio.o batch.o clientname.o chmod.o acls.o xattrs.o
+ fileio.o batch.o clientname.o chmod.o acls.o xattrs.o sleeper.o
OBJS3=progress.o pipe.o
@dypsilon
dypsilon / frontendDevlopmentBookmarks.md
Last active July 12, 2025 14:05
A badass list of frontend development resources I collected over time.
@pothi
pothi / pma-auto-update.sh
Last active March 24, 2017 07:58
Automate PhpMyAdmin updates - Please Check https://github.com/pothi/linux-bootstrap-snippets/blob/master/pma-auto-update.sh for Updates. Thanks!
#!/bin/bash
# Script to automate PhpMyAdmin updates
# To manually switch to another version, use...
# bash pma-auto-update.sh version_number
### Variables
LOGDIR=$HOME/log
LOG_FILE=$LOGDIR/phpmyadmin-updates.log
use Modern::Perl;
use charnames ':full';
binmode( STDOUT, ":utf8" );
use WWW::Mechanize::Firefox;
use URI::Split qw( uri_split uri_join );
use Try::Tiny;
my $url = 'http://yandex.ru/';
my $stop = 10;
backup_url_from_page( $url, $stop );
@joyrexus
joyrexus / README.md
Last active June 4, 2025 17:47
Perl one-liners

Hi:

perl -e 'print "hello world!\n"'

A simple filter:

perl -ne 'print if /REGEX/'

Filter out blank lines (in place):

@arunoda
arunoda / gist:7790979
Last active March 13, 2025 14:30
Installing SSHPass

Installing SSHPASS

SSHPass is a tiny utility, which allows you to provide the ssh password without using the prompt. This will very helpful for scripting. SSHPass is not good to use in multi-user environment. If you use SSHPass on your development machine, it don't do anything evil.

Installing on Ubuntu

apt-get install sshpass

Installing on OS X