This file contains hidden or 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
{ | |
"title": "Ducky X Varmilo Miya Pro - Enable functional rows without mode switch using Fn+PageDn", | |
"rules": [ | |
{ | |
"description": "Fn + = increases the volume", | |
"manipulators": [ | |
{ | |
"type": "basic", | |
"from": { | |
"key_code": "equal_sign", |
This file contains hidden or 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 | |
set -e | |
BRANCH_NAME=$(git symbolic-ref -q --short HEAD) | |
MIGRATION_FILE=$(git diff --name-only $BRANCH_NAME $(git merge-base $BRANCH_NAME integration) | grep migrations) | |
MIGRATION_FILE_COUNT=$(echo $MIGRATION_FILE | awk '{print NF}') | |
if [[ $MIGRATION_FILE_COUNT -gt 1 ]]; then | |
printf '\033[93mcurrent branch $BRANCH_NAME has more than one migration file! exiting. \033[0m\n' |
This file contains hidden or 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
#encoding: utf-8 | |
import xml.etree.ElementTree as ET | |
tree = ET.parse('angkorwat.xml') | |
root = tree.getroot() | |
list_title = [] | |
list_image = [] | |
list_image_author = [] | |
list_image_copyright_sign = [] |
This file contains hidden or 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
cnborn@brahma ~$ mysql_install_db --verbose --user=`whoami` --basedir="$(brew --prefix mysql)" --datadir=/usr/local/var/mysql --tmpdir=/tmp | |
Installing MySQL system tables... | |
OK | |
Filling help tables... | |
OK | |
To start mysqld at boot time you have to copy | |
support-files/mysql.server to the right place for your system | |
PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER ! |
This file contains hidden or 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
==> Pouring mysql-5.5.25a.snowleopard.bottle.tar.gz | |
==> Caveats | |
Set up databases to run AS YOUR USER ACCOUNT with: | |
unset TMPDIR | |
mysql_install_db --verbose --user=`whoami` --basedir="$(brew --prefix mysql)" --datadir=/usr/local/var/mysql --tmpdir=/tmp | |
To set up base tables in another folder, or use a different user to run | |
mysqld, view the help for mysqld_install_db: | |
mysql_install_db --help |
This file contains hidden or 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
port installed #list all installed | |
sudo port uninstall XXXX | |
#backup your MySQL databases | |
sudo port uninstall XXXX | |
port install # uninstall until it shows nothing |
This file contains hidden or 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
#ab -n 100000 http://127.0.0.1:8880/hello/world | |
#You have to run Sentry at 127.0.0.1:8000 and replace the following DSN. | |
from bottle import route, run | |
@route('/hello/:name') | |
def index(name='World'): | |
from raven import Client | |
client = Client('http://48ca560b5e2b4fe8b8802ed29c54de81:[email protected]:8000/2') | |
client.captureMessage('hello world!') |
This file contains hidden or 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/local/bin/ruby | |
require 'net/smtp' | |
########################################## | |
#Ruby Testboy - Runs Django Test for you | |
# | |
# If there are any unitest failed, testboy will send out the error messages immediately | |
# to the recipients you set below. | |
# | |
#SETUP: |
This file contains hidden or 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 bash | |
# A bash Script to migrate Sqlite3 DB when Django Model Schema changes. | |
# It will only migrate tables whose Schema unchanged. | |
# cp this script to your Django Project Directory, | |
# then run as sqlitemig.sh yoursqlitedbname.db | |
# Written by CNBorn[%]hotmail.com | |
#echo $1 | |
if test ! -f "$1" |