Skip to content

Instantly share code, notes, and snippets.

spalladino /
Created Dec 22, 2015
Backup and restore a mysql database from a running Docker mysql container
# Backup
docker exec CONTAINER /usr/bin/mysqldump -u root --password=root DATABASE > backup.sql
# Restore
cat backup.sql | docker exec -i CONTAINER /usr/bin/mysql -u root --password=root DATABASE
phrawzty /
Last active Nov 26, 2021
simple python http server to dump request headers
#!/usr/bin/env python2
import SimpleHTTPServer
import SocketServer
import logging
PORT = 8000
class GetHandler(SimpleHTTPServer.SimpleHTTPRequestHandler):
lttlrck / gist:9628955
Created Mar 18, 2014
rename git branch locally and remotely
View gist:9628955
git branch -m old_branch new_branch # Rename branch locally
git push origin :old_branch # Delete the old branch
git push --set-upstream origin new_branch # Push the new branch, set local branch to track the new remote
sartak / gist:3921255
Last active Oct 15, 2021
Anki 2 annotated schema
View gist:3921255
-- see for a more maintained version of this
-- cards are what you review. easy!
id integer primary key,
-- the epoch milliseconds of when the card was created
nid integer not null,
did integer not null,
-- deck id (available in col table)
anonymous / gist:2523336
Created Apr 29, 2012
Changing author info
View gist:2523336
git filter-branch --env-filter '
if [ "$GIT_COMMITTER_EMAIL" = "" ]
eirc / .rvmrc
Created Oct 20, 2011 — forked from jimeh/decode.rb
Ruby-based Benchmark of MessagePack vs. JSON vs. Yajl vs. Protobuffers vs. MultiJson vs. Marshal vs. YAML vs. BSON
View .rvmrc
rvm --create ree@benchmarks
tkersey / gist:1130675
Created Aug 7, 2011
Getting a Motorola SBG6580 into “Bridge” mode
View gist:1130675

found at:

Getting a Motorola SBG6580 into “Bridge” mode on TimeWarner Wideband

  1. Unplug coax cable from Motorola
  2. Hold down the white reset button on the back panel with a pen for 30s.  This resets all settings to factory defaults. The modem will be auto-reconfigured once you plug in the coax cable.
  3. When modem is back on plug in a computer with an Ethernet cable into the modem.
  4. Connect to and login with “admin” / “motorola”
  5. Now you will make some changes:
    • Wireless -> Primary Network -> Disabled