Skip to content

Instantly share code, notes, and snippets.

View charliefulton's full-sized avatar

Charlie Fulton charliefulton

View GitHub Profile
@charliefulton
charliefulton / ts
Created February 3, 2024 18:56
typescript crash course
let id: number = 5;
let company: string = 'Traversy Media';
let isPublished: boolean = true;
let x: any = 'Hello';
x = true;
let age: number;
age = 33;
@charliefulton
charliefulton / playgroundjson.swift
Created March 3, 2016 20:20
open json file from resources of playground
//: Playground - noun: a place where people can play
import Foundation
let currentPath = NSBundle.mainBundle().bundlePath
let file = currentPath + "/en_MediaComponents.json"
if let jsonData = NSData(contentsOfFile: file) {
do {
@charliefulton
charliefulton / gist:5abfc1f6829bd090e24d
Created May 19, 2015 16:35
grixis delver - mtgochamp
4 Delver of Secrets
2 Gurmag Angler
4 Snapcaster Mage
2 Tasigur, the Golden Fang
3 Young Pyromancer
1 Burst Lightning
1 Deprive
1 Electrolyze
3 Gitaxian Probe
1 Izzet Charm
@charliefulton
charliefulton / vintage_restricted.txt
Created June 21, 2014 12:53
mtg vintage restricted list
1 Ancestral Recall
1 Balance
1 Black Lotus
1 Brainstorm
1 Channel
1 Demonic Consultation
1 Demonic Tutor
1 Fastbond
1 Flash
1 Gifts Ungiven
#!/bin/bash
# author: charlie_fulton@me.com
#
# If the current directory is a git project then this script will make a bare clone
# of it into the directory specified (most likely a network based directory) e.g. a shared Dropbox folder.
#
# The idea is to have a place to push / pull changes from that is shared with another developer.
# see idea from: http://www.cimgf.com/2008/06/03/version-control-makes-you-a-better-programmer/
@charliefulton
charliefulton / cocos2d 1.x iOS 6 orientation fix
Created February 18, 2013 01:13
code to fix iOS6.x + orientation issues with cocos2d 1.1
I made it work by playing around with the orientations and coming back to the original solution ...
The final solution is quite close to the one given on the other threads :
In the appDelegate :
#if GAME_AUTOROTATION == kGameAutorotationUIViewController
[director setDeviceOrientation:kCCDeviceOrientationPortrait];
#else
[director setDeviceOrientation:kCCDeviceOrientationLandscapeRight];
#endif
@charliefulton
charliefulton / .gitignore_global
Created July 14, 2012 20:13
git global ignore file
# Compiled source #
###################
*.com
*.class
*.dll
*.exe
*.o
*.so
######################