Skip to content

Instantly share code, notes, and snippets.

@MaxGabriel
MaxGabriel / gist:5385841
Last active December 16, 2015 05:39
Xcode snippets for Appledoc syntax
Above a class @interface or above an @property.
/** <#Description of property or class#> */
Above a method
/** <#Discussion#>
@param <#param name#> <#Param description#>
@return <#Return description#>
*/
@MaxGabriel
MaxGabriel / gist:5475619
Created April 28, 2013 02:29
Stacktrace from rake middleman:build --trace on Cocoapods website
unknown14109fd26fa5:cocoapods.github.com Max$ rake middleman:build --trace
** Invoke middleman:build (first_time)
** Invoke generate:all (first_time)
** Invoke generate:dsl (first_time)
** Execute generate:dsl
Building DSL Data
Generating docs_data/specification.yaml
Generating docs_data/podfile.yaml
** Invoke generate:gems (first_time)
** Execute generate:gems
@MaxGabriel
MaxGabriel / Casting to bool fails 6% of time
Created June 8, 2013 06:42
Example showing how casting to BOOL causes failure 6% of the time, as explained in http://www.mikeash.com/pyblog/friday-qa-2012-12-14-objective-c-pitfalls.html
int failsUsingCurrentMethod = 0;
int failsUsingNotNot = 0;
for (int i=0; i < 10000; i++) {
NSDate *date = [NSDate date];
NSAssert(date, @"Date should never be nil");
BOOL booleanUsingCurrentMethod = (date);
if (!booleanUsingCurrentMethod) {
failsUsingCurrentMethod++;
}
@MaxGabriel
MaxGabriel / Steam System Information
Created July 18, 2013 03:09
System information from Steam
Processor Information:
Model: MacBookPro10,1
Vendor: GenuineIntel
Speed: 2600 Mhz
8 logical processors
4 physical processors
HyperThreading: Supported
FCMOV: Supported
SSE2: Supported
SSE3: Supported
$ bundle exec pry-remote -r ./config/environment.rb
From: /var/www/heyzap.com/releases/20131206194119/app/controllers/in_game_api/ads_controller.rb @ line 45 InGameApi::AdsController#fetch_ad:
40: t0 = Time.new
41: api_response = {}
42:
43: Pry.config.input = STDIN
44: Pry.config.output = STDOUT
=> 45: binding.remote_pry
@MaxGabriel
MaxGabriel / InstallingYesod
Last active January 3, 2016 14:39
Full output of trying to install Yesod
maximilians-mbp:Haskell Max$ cabal install yesod
Resolving dependencies...
In order, the following would be installed:
attoparsec-conduit-1.0.1.2 (reinstall)
blaze-builder-conduit-1.0.0 (reinstall)
http-client-conduit-0.2.0.1 (reinstall) changes: resourcet-0.4.10 -> 0.4.9
http-conduit-2.0.0.3 (reinstall) changes: http-client-0.2.1 -> 0.2.0.3,
http-client-conduit-0.2.0.1 added, http-client-tls-0.2.0.2 added,
http-types-0.8.3 added
monad-logger-0.3.4.0 (reinstall)
@MaxGabriel
MaxGabriel / persistentInstallation.txt
Created January 19, 2014 04:01
Installing Persistent on OS X
maximilians-mbp:Haskell Max$ cabal install persistent
**********************************************************************
=== Configuration for cabal has been written to
/Users/Max/.cabal/config
=== Executables will be installed in:
/Users/Max/Library/Haskell/bin
@MaxGabriel
MaxGabriel / SubliminalChangelog1dot1.md
Created April 6, 2014 05:02
Git commits to be included in the changelog
  • a1eda4f (HEAD, castToURL) Initial pass at using session keys
  • b39467e (origin/castToURL) Cast to NSURL to silence warning when using Cocoapods
  • f835574 (upstream/master, printSeed, dispatchGetCurrentQueue, dashW) Merge pull request #168 from MaxGabriel/dispatchGetCurrentQueue
  • d873c29 (origin/dispatchGetCurrentQueue) Use dispatch_get_specific to workaround the deprecation of dispatch_get_current_queue.
  • b3510b5 Merge pull request #30 from MaxGabriel/cleanCocoapod
    • Add Podspec for Cocoapods support
  • 0a4c64f Merge pull request #165 from inkling/jeff/pick_up_ocmock
  • 2b6e5bc Pick up the latest OCMock to resolve Xcode 5.1. warnings.
  • 54994e3 Merge pull request #160 from MaxGabriel/slimREADME
  • f74b7d3 (origin/cleanCocoapod, cleanCocoapod) Add Podspec
@MaxGabriel
MaxGabriel / H5s.md
Created April 7, 2014 01:39
Using h5s for notable features/bug fixes, and h6 for things like SLElement subclasses