Skip to content

Instantly share code, notes, and snippets.

View jessedc's full-sized avatar

Jesse Collis jessedc

View GitHub Profile
@jessedc
jessedc / Genstrings.sh
Created July 16, 2012 00:12
genstrings
genstrings -s JCLocalizedString -q -o localization [files]
genstrings -s JCLocalizedString -q -a -o localization [files]
@jessedc
jessedc / gist:3462508
Last active October 9, 2015 07:37
TF2 Dedicated Server

TF2 Wiki - linux dedicated server

update the game ./steam -command update -game tf -dir .

run the game ./srcds_run -game tf +map cp_badlands

  • [Here's a list of the maps][2] (scroll to bottom)
@jessedc
jessedc / php_on_osx.mdown
Last active September 28, 2017 22:13
PHP setup instructions OSX 1.8 Mountain Lion

Setting up PHP on Mountain Lion from scratch

Editing text files from the command line is made easier with TextMate with it's command line extension mate OR Sublime text2 with command line extensions. However the built in nano text editor is easy to use as well.

Some guidance gleaned form from coolestguyplanettech.com

Change permissions on /Library/WebServer/Documents so all users can write to it

sudo chmod -R o+w /Library/WebServer/Documents
@jessedc
jessedc / CSGO.mdown
Created February 2, 2013 23:23
CSGO Dedicated Server Configuration

List of configuration options

[Valve's GSGO Dedicated Server Page][2]

Running the game:

srcds -game csgo -console -usercon +game_type 1 +game_mode 0 +mapgroup mg_armsrace +map ar_shoots
- (void)scrollViewDidZoom:(UIScrollView *)scrollView
{
[self updateZoomableViewCenter:scrollView];
}
- (void)updateZoomableViewCenter:(UIScrollView *)scrollView
{
CGSize scrollViewSize = scrollView.bounds.size;
CGSize contentSize = scrollView.contentSize;
@jessedc
jessedc / vimeo-js-api.html
Last active June 17, 2018 20:59
Autoplay Vimeo Videos from outside their iframe using Javascript.
<html>
<head></head>
<body>
<!-- NOTE: ?api=1 and player_id at the end of the URL -->
<iframe id="player" width="" height="" src="http://player.vimeo.com/video/62207569?api=1&player_id=player" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe>
<script src="http://a.vimeocdn.com/js/froogaloop2.min.js"></script>
<script>
var player = $f(document.getElementById('player'));
@jessedc
jessedc / ViewController.h
Last active August 29, 2015 13:56
Demonstrates the stricter behaviour of Xcode 5.1 in regards to overloading objective C property declarations in subclasses. -Wobjc-property-synthesis
#import <UIKit/UIKit.h>
@interface REABaseViewController : UIViewController
@property (nonatomic, readonly, strong) NSObject *anObject;
@end
@interface REAViewController : REABaseViewController
//error: auto property synthesis will not synthesize property 'anObject'
//because it is 'readwrite' but it will be synthesized 'readonly' via
//another property [-Werror,-Wobjc-property-synthesis]
@jessedc
jessedc / extract.sh
Created March 6, 2014 06:03
Extract entitlements from the provisioning profile
security cms -D -i AppStore.mobileprovision > tmp.plist && /usr/libexec/PlistBuddy -x -c 'Print:Entitlements' tmp.plist
@jessedc
jessedc / python_env.md
Last active August 29, 2015 14:00
Setting up a python development environment on OSX without needing to use sudo

Assumptions

Using sudo for local development tooling is a bad idea. This is the bare minimum to get your python environment up and running so you can install pip and virtualenv at the user level and then continue to use [virtualenv][1] to get your own project environments running.

  • OSX 10.9+
  • You have homebrew installed
  • /usr/loca/bin is part of your $PATH

Find where the system python version is

@jessedc
jessedc / wwdc-2014.mdown
Last active August 29, 2015 14:02
WWDC 2014 Sessions

Tuesday

Attended/Watched / Not Attended

  • 09:00 - 401 What's New in Xcode 6 / 201 Advanced Topics in Internationalization
  • 10:15 - 202 What's New in Cocoa Touch
  • 11:30 - 204 What's New in Cocoa / 412 Localizing with Xcode 6
  • 14:00 - 402 Introduction to Swift / 206 Introducing the Modern WebKit API / 205 Creating App Exentions for iOS and OSX Pt 1.
  • 15:15 - 208 Introducing Cloud Kit / 708 Taking Core Location Indoors / 707 What's new in Foundation Networking
  • 16:30 - 418 Improving Your App With Instruments / 211 Designing Intuttive User Experiences