This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
begin; | |
insert into table select * from only table where id between 1 and 10000000; | |
delete from only table where id between 1 and 10000000; | |
commit; | |
begin; | |
insert into table select * from only table where id between 10000001 and 20000000; | |
delete from only table where id between 10000001 and 20000000; | |
commit; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
from selenium import webdriver | |
baseurl = "http://staging-v2.postano.com/login" | |
username = "didip" | |
password = "baz" | |
mydriver = webdriver.Firefox() | |
mydriver.get(baseurl) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
PORT=4200 | |
sudo launchctl unload /Library/LaunchDaemons/com.crashplan.engine.plist | |
sudo sed -i '' "s/\(<servicePort>\)[^<]*/\1$PORT/" /Library/Application\ Support/CrashPlan/conf/my.service.xml | |
sed -i '' "s/#*\(servicePort=\).*/\1$PORT/" /Applications/CrashPlan.app/Contents/Resources/Java/conf/ui.properties | |
defaults write /Applications/CrashPlan.app/Contents/Resources/CrashPlan\ menu\ bar.app/Contents/Info CPPort $PORT | |
sudo launchctl load /Library/LaunchDaemons/com.crashplan.engine.plist |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
> docker version | |
Client version: 1.1.2 | |
Client API version: 1.13 | |
Go version (client): go1.2.2 | |
Git commit (client): d84a070/1.1.2 | |
Server version: 1.1.2 | |
Server API version: 1.13 | |
Go version (server): go1.2.2 | |
Git commit (server): d84a070/1.1.2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cd `brew --prefix` | |
git remote add origin https://github.com/mxcl/homebrew.git | |
git fetch origin | |
git reset --hard origin/master |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from unittest import TestCase | |
from paste.deploy import loadapp | |
from paste.script.appinstall import SetupCommand | |
from pylons import config, url | |
from routes.util import URLGenerator | |
from webtest import TestApp | |
import pylons.test | |
import sys, os.path | |
ROOT_PATH = os.path.realpath(os.path.join(os.path.dirname(__file__), '..', '..')) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import random | |
KATAKANA_1 = [ | |
'a', 'i', 'u', 'e', 'o', | |
'ka', 'ki', 'ku', 'ke', 'ko', | |
'sa', 'shi', 'su', 'se', 'so', | |
'ta', 'chi', 'tsu', 'te', 'to', | |
'na', 'ni', 'nu', 'ne', 'no', | |
'ha', 'hi', 'fu', 'fe', 'fo', | |
'ma', 'mi', 'mu', 'me', 'mo', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mysqldump --user=root --default-character-set=latin1 -c --insert-ignore --skip-set-charset <dbname> <table-name> > <filename>.sql && | |
iconv -f ISO-8859-1 -t UTF-8 <filename>.sql > <filename>.utf8.sql && | |
perl -pi -w -e 's/CHARSET=latin1/CHARSET=utf8/g;' <filename>.sql.utf8.sql && | |
mysql --user=root --max_allowed_packet=16M --default-character-set=utf8 <dbname> < <filename>.utf8.sql |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SHOW SLAVE STATUS \G | |
STOP SLAVE; | |
SET GLOBAL SQL_SLAVE_SKIP_COUNTER = 1; | |
START SLAVE; | |
SHOW SLAVE STATUS \G |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
perl -ne 'm/^([^#][^\s=]+)\s*(=.*|)/ && printf("%-35s%s\n", $1, $2)' /etc/mysql/my.cnf |
OlderNewer