Skip to content

Instantly share code, notes, and snippets.

View schonstal's full-sized avatar

Josh Schonstal schonstal

View GitHub Profile
Once a nameless being, I always yearned for an identity.
One fateful morning I approached my father and said "I'm hungry".
"Hi Hungry, I'm dad." he replied.
"But daaaaad!" I responded.
And he looked at me with a smile and said "I'm just Joshing you"
And at that moment, joy washed over me.
I was a real boy.
I had a name.
I had been Joshed.
@schonstal
schonstal / gist:7360492
Created November 7, 2013 19:28
I beat candy box 2! Yay!
bool candiesThrownGotChocolateBar=false, bool candyBoxBoxOpened=true, bool castleBigRoomHovenHappy=true, bool castleRoom2LitFire=true, bool castleRoom2TookObject=true, bool castleTowerFirstVisitDone=true, bool castleTowerPStoneDone=true, bool castleTowerLStoneDone=true, bool castleTowerAStoneDone=true, bool castleTowerYStoneDone=true, bool castleTowerTookTalkingCandy=true, bool castleKilledNougatMonster=true, bool cellarDone=true, bool dragonDone=true, bool dragonUnlockedCyclops=true, bool forgeFoundLollipop=true, bool forgeBoughtWoodenSword=true, bool forgeBoughtIronAxe=true, bool forgeBoughtPolishedSilverSword=true, bool forgeBoughtLightweightBodyArmour=false, bool forgeBoughtScythe=false, bool fortressRoom1ChestFound=true, bool fortressRoom3ChestFound=false, bool fourthHouseFoundLollipopOnCupboard=true, bool gameDebug=false, bool gameInvertedColors=false, bool lighthousePuzzleDone=false, bool lollipopFarmPlant1LollipopButtonUnlocked=true, bool lollipopFarmPlant10LollipopsButtonUnlocked=true, bool lollipopF
@schonstal
schonstal / BBB.md
Last active December 23, 2015 20:59
BLACK BEAN BOIGAS

Ingredients

  • Panko, ~1c
  • Flour, ~1/4c
  • Black Beans, 2 cans
  • Red Onion, 1 medium
  • Egg, 1 large
  • Fresh Crushed Garlic, ~1t
  • Cumin, ~1T
  • Secret Aardvark Sauce, 1 shitload
@schonstal
schonstal / gist:6189985
Last active December 20, 2015 20:19
how to pause
var pauseGroup:PauseGroup;
var paused:Boolean = false;
public override function create():void {
//your normal create
pauseGroup = new PauseGroup();
}
public override function update():void {
if(FlxG.keys.justPressed(MY_PAUSE_BUTTON)) {
#!/bin/bash
SITTING=false
while :; do
if $SITTING
then
terminal-notifier -title "Samuel L. Jackson Says" -message "SIT THE FUCK DOWN"
SITTING=true
else
terminal-notifier -title "Samuel L. Jackson Says" -message "STAND THE FUCK UP"
SITTING=false
@schonstal
schonstal / gist:5674536
Created May 29, 2013 23:05
AS3 singleton example
package
{
public class G
{
public var _paused:Boolean;
private static var _instance:G = null;
private static function get instance():G {
if(_instance == null) {
_instance = new G();
build:
[exec] defaults: Error: unable to open '/usr/local/flex3/bin/../frameworks/flex-config.xml'
[exec] Result: 1
BUILD SUCCESSFUL
Total time: 2 seconds
blendedColor =
((((colorAlpha*(newColor&0xff0000) + (256-colorAlpha)*(color&0xff0000)) >> 8) & 0xff0000) |
(((colorAlpha*(newColor&0xff) + (256-colorAlpha)*(color&0xff)) >> 8) & 0xff) |
(((colorAlpha*(newColor&0xff00) + (256-colorAlpha)*(color&0xff00)) >> 8) & 0xff00)) |
0xff000000;
@schonstal
schonstal / gist:4638869
Created January 25, 2013 23:32
hue thing
//In create
palette = new FlxSprite();
palette.loadGraphic(Assets.CMY);
for(var x:int = 0; x < palette.width; x++) {
for(var y:int = 0; y < palette.height; y++) {
var pixel:uint = palette.pixels.getPixel32(x, y);
if(colors.indexOf(pixel) < 0) {
colors.push(palette.pixels.getPixel32(x, y));
}
}
@schonstal
schonstal / gist:4582735
Created January 21, 2013 00:11
my vimrc
syntax on
filetype on
set tabstop=2
set shiftwidth=2
set expandtab
set smartindent
set number
set guioptions-=T
color brilliance_black