Skip to content

Instantly share code, notes, and snippets.

View jamesnesfield's full-sized avatar

James Nesfield jamesnesfield

View GitHub Profile
@jamesnesfield
jamesnesfield / nice-gradient.css
Created October 29, 2014 17:28
nice gradient
.nice-gradient {
background-image: linear-gradient(160deg,#63D663 20%,#57D39C 80%);
}
@jamesnesfield
jamesnesfield / gh-pages-deploy.md
Created November 13, 2015 23:04 — forked from cobyism/gh-pages-deploy.md
Deploy to `gh-pages` from a `dist` folder on the master branch. Useful for use with [yeoman](http://yeoman.io).

Deploying a subfolder to GitHub Pages

Sometimes you want to have a subdirectory on the master branch be the root directory of a repository’s gh-pages branch. This is useful for things like sites developed with Yeoman, or if you have a Jekyll site contained in the master branch alongside the rest of your code.

For the sake of this example, let’s pretend the subfolder containing your site is named dist.

Step 1

Remove the dist directory from the project’s .gitignore file (it’s ignored by default by Yeoman).

// cant remember where i got this from, not my code though
- (void)setSoundNamed:(NSString *)name forControlEvent:(UIControlEvents)controlEvent
{
// Remove the old UI sound.
NSString *oldSoundKey = [NSString stringWithFormat:@"%lu", (unsigned long)controlEvent];
AVAudioPlayer *oldSound = [self sounds][oldSoundKey];
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wselector"
@jamesnesfield
jamesnesfield / chirp-offline.m
Last active February 15, 2016 11:37
iOS Getting Started
[[ChirpSDK sdk] setOfflineOnly:YES];
[[ChirpSDK sdk] startListening:^(Chirp *chirp, NSError *error)
{
NSLog(@"Heard chirp: %@", chirp.shortcode);
}];
@jamesnesfield
jamesnesfield / iOS-Example.m
Created December 19, 2018 11:18
ios-example
/*------------------------------------------------------------------------------
* Initialise the SDK with your Chirp app key and secret
* (configured in Licence.h)
*----------------------------------------------------------------------------*/
self.connect = [[ChirpConnect alloc] initWithAppKey:CHIRP_APP_KEY
andSecret:CHIRP_APP_SECRET];
NSLog(@"%@", [self.connect version]);
NSError *error = [self.connect setConfig:CHIRP_APP_CONFIG];