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
# Rake Quick Reference | |
# by Greg Houston | |
# http://ghouston.blogspot.com/2008/07/rake-quick-reference.html | |
# ----------------------------------------------------------------------------- | |
# Running Rake | |
# ----------------------------------------------------------------------------- | |
# running rake from the command-line: | |
# rake --help |
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 System.Collections.Generic; | |
using System.IO; | |
using UnityEditor; | |
using UnityEditorInternal; | |
using UnityEngine; | |
// This is only useful for spritesheets that need to be automatically sliced (Sprite Editor > Slice > Automatic) | |
public class AutoSpriteSlicer | |
{ | |
[MenuItem("Tools/Slice Spritesheets %&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
// Disable "Field is never assigned to..." compiler's warning. Justification: the field is assigned by MEF. | |
#pragma warning disable CS0649 | |
/// <summary> | |
/// Classification registry to be used for getting a reference | |
/// to the custom classification type later. | |
/// </summary> | |
[Import] | |
private IClassificationTypeRegistryService classificationRegistry; |
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 | |
# https://gist.github.com/949831 | |
# http://blog.carbonfive.com/2011/05/04/automated-ad-hoc-builds-using-xcode-4/ | |
# command line OTA distribution references and examples | |
# http://nachbaur.com/blog/how-to-automate-your-iphone-app-builds-with-hudson | |
# http://nachbaur.com/blog/building-ios-apps-for-over-the-air-adhoc-distribution | |
# http://blog.octo.com/en/automating-over-the-air-deployment-for-iphone/ | |
# http://www.neat.io/posts/2010/10/27/automated-ota-ios-app-distribution.html |
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
// Example program | |
#include <iostream> | |
#include <string> | |
/* | |
Getter and setter functor object. | |
T Value type | |
Owner Type of owner class | |
get_function Owner's getter function type |
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
' ------------------------------------------------------------------------------ | |
' Quick ref for Excel Macros | |
' ------------------------------------------------------------------------------ | |
' for loops | |
Dim i as Integer | |
For i = 0 To 10 | |
' Basic ranged loop | |
Next i |
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 regex module | |
import re | |
#Simple match of a phone number 090-1234-5678 | |
print("####### Simple match of a phone number 090-1234-5678 #######") | |
match = re.match( r"\d{3}-\d{4}-\d{4}", "090-1234-5678" ) | |
print(match) | |
#No match | |
print("####### No match #######") |
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
var canvas, stage, exportRoot; | |
function init() { | |
canvas = document.getElementById("canvas"); | |
//Setup the canvas widht and height with devicePixelRatio. And set CSS width and height properties. | |
var w = 320; | |
var h = 357; | |
canvas.width = w * window.devicePixelRatio; | |
canvas.height = h * window.devicePixelRatio; |
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
/* | |
* Send the keystroke for toggling | |
* Rikaichan | |
*/ | |
var event = document.createEvent("KeyboardEvent"); | |
event.initKeyEvent( | |
"keypress", //Key code | |
true, // in boolean canBubbleArg, | |
true, // in boolean cancelableArg, |