Skip to content

Instantly share code, notes, and snippets.

@spalladino
spalladino / mysql-docker.sh
Created December 22, 2015 13:47
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
phrawzty / 2serv.py
Last active April 7, 2024 13:57
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
lttlrck / gist:9628955
Created March 18, 2014 20:34
rename git branch locally and remotely
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
sartak / a.md
Last active March 22, 2024 22:16
Anki 2 annotated schema
anonymous
anonymous / gist:2523336
Created April 29, 2012 02:01
Changing author info
#!/bin/sh
git filter-branch --env-filter '
an="$GIT_AUTHOR_NAME"
am="$GIT_AUTHOR_EMAIL"
cn="$GIT_COMMITTER_NAME"
cm="$GIT_COMMITTER_EMAIL"
if [ "$GIT_COMMITTER_EMAIL" = "your@email.to.match" ]
@eirc
eirc / .rvmrc
Created October 20, 2011 07:53 — forked from jimeh/decode.rb
Ruby-based Benchmark of MessagePack vs. JSON vs. Yajl vs. Protobuffers vs. MultiJson vs. Marshal vs. YAML vs. BSON
rvm --create ree@benchmarks
@tkersey
tkersey / gist:1130675
Created August 7, 2011 19:16
Getting a Motorola SBG6580 into “Bridge” mode

found at: http://fascinated.fm/post/2379188731/getting-a-motorola-sbg6580-into-bridge-mode-on

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 http://192.168.0.1 and login with “admin” / “motorola”
  5. Now you will make some changes:
 
  • Wireless -> Primary Network -> Disabled