./manage.py dbshell
SELECT * FROM south_migrationhistory WHERE app_name = '<APP_NAME>';
104 | social_auth | 0001_initial...
105 | social_auth | 0002_auto__add_unique_nonce...
DELETE FROM south_migrationhistory WHERE app_name = '';
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
Dictionary <string, string> filters = new Dictionary <string, string>(); | |
filters.Add("level", "2"); | |
filters.Add("sword", "excalibur"); | |
filters.Add("grenades", "2"); | |
Arbiter.RequestCashChallenge( filters, OnCashChallengeCreated, OnCashChallengeError ); |
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 "UIImage+ImageEffects.h" | |
// Take a snapshot of whatever view you want to blur | |
UIImage *image; | |
UIGraphicsBeginImageContext(myView.bounds.size); | |
[myView drawViewHierarchyInRect:myView.bounds afterScreenUpdates:true]; | |
image = UIGraphicsGetImageFromCurrentImageContext(); | |
UIGraphicsEndImageContext(); | |
// Then set the background of whatever other view to be the blurry version of the snapshot |
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
using UnityEngine; | |
using System.Collections; | |
public class SpinningReel : MonoBehaviour { | |
private bool isSpinning = true; | |
public float smooth = 10f; | |
void Update () { | |
if (Input.GetKeyUp (KeyCode.S)) |
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
# All commands below are run within psql | |
psql | |
# List all roles | |
\du | |
# List all Databases | |
\list | |
# Adding a role 'august' with superuser privaleges |
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
// request Game Center verification data for localPlayer from apple | |
- (void)authenticateGameCenterPlayer:(GKLocalPlayer *)localPlayer | |
{ | |
[localPlayer generateIdentityVerificationSignatureWithCompletionHandler:^(NSURL *publicKeyUrl, NSData *signature, NSData *salt, uint64_t timestamp, NSError *error) { | |
if (error) { | |
NSLog(@"ERROR: %@", error); | |
} | |
else { | |
// package data to be sent to server for verification | |
NSDictionary *params = @{@"publicKeyUrl": publicKeyUrl, |
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
# Gets both apps with relating models back to square one. | |
python manage.py migrate APP_1 zero | |
python manage.py migrate APP_2 zero | |
# At this point, there were models in APP_1 initial migration that no longer existed. | |
# So I couldn't just run all the APP_1 migrations at once | |
# Step through history | |
python manage.py migrate APP_1 0001 | |
python manage.py migrate APP_2 0001 |
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
sudo chown -R $USER /usr/local |
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
//FightCode can only understand your robot | |
//if its class is called Robot | |
var Robot = function(robot) { | |
}; | |
Robot.prototype.onIdle = function(ev) { | |
var robot = ev.robot; | |
robot.fire(); |