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
<?php | |
class IPControl { | |
public static $ROBOT_IP_RANGES = array( | |
array( | |
'name'=>'Monitoring Server', | |
'min'=>'173.203.5.0', | |
'max'=>'173.203.5.127', | |
), | |
array( | |
'name'=>'Search Server', |
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
SELECT SUBSTRING(MD5(RAND()) FROM 1 FOR 32) AS `key`; |
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
// Clone DOM | |
var originalContent = $('#content'); | |
var newLocation = $('#new-location'); | |
var newContent = originalContent.clone(); | |
newContent.appendTo(newLocation); | |
// Clone the canvas across | |
var originalCanvas = originalContent.find('canvas'); | |
var cloneCanvas = newContent.find("canvas"); |
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
CREATE TABLE `A` ( | |
`id` BIGINT UNSIGNED NOT NULL AUTO_INCREMENT , | |
`name` VARCHAR(45) NULL , | |
`name` VARCHAR(45) NULL , | |
PRIMARY KEY (`id`)); | |
CREATE TABLE `B` ( | |
`id` BIGINT UNSIGNED NOT NULL AUTO_INCREMENT , | |
`aId` BIGINT UNSIGNED NOT NULL , | |
`info` VARCHAR(128) NULL , |
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
ALTER IGNORE TABLE `name` ADD UNIQUE INDEX(`a`,`b`); |
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 | |
# Some things taken from here | |
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx | |
# Set the colours you can use | |
black='\033[0;30m' | |
white='\033[0;37m' | |
red='\033[0;31m' | |
green='\033[0;32m' |
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
# --------------------------------------------------------------------------- | |
# | |
# Description: This file holds all my BASH configurations and aliases | |
# | |
# Sections: | |
# 1. Environment Configuration | |
# 2. Make Terminal Better (remapping defaults and adding functionality) | |
# 3. File and Folder Management | |
# 4. Searching | |
# 5. Process Management |
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 | |
# Takes one parameter: a remote git repository URL. | |
# | |
# This is the stuff this script does: | |
# | |
# 1. Clones the repository | |
# 2. Fetches all remote branches | |
# 3. Compresses the folder | |
# 4. Deletes the cloned folder. |