This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| RUBY: | |
| # push timecheck command to clients every 30 minutes for rooms where client count is greater than 0 | |
| timecheck = EM.add_periodic_timer(60*30) { | |
| @channels.keys.each do | key | | |
| if @channels[key][:clients].length > 0 | |
| data = { :type => "roomnotice", :special => "timecheck", :msg => "heyo!" }.to_json | |
| @channels[key][:channel].push data | |
| end | |
| end | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| pallick:cocosmotion chrisallick$ rake | |
| Build ./build/iPhoneSimulator-6.0-Development | |
| Build vendor/cocos2d-iphone | |
| Build settings from command line: | |
| ARCHS = i386 | |
| CONFIGURATION_BUILD_DIR = .build | |
| IPHONEOS_DEPLOYMENT_TARGET = 6.0 | |
| SDKROOT = iphonesimulator6.0 | |
| === BUILD NATIVE TARGET kazmath OF PROJECT cocos2d-ios WITH CONFIGURATION Release === |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| AudioSFX = function( _p, _autoplay ) { | |
| var self = this; | |
| var parent = _p; | |
| this.sounds = new Array(); | |
| this.context = new webkitAudioContext(); | |
| this.autoplay = _autoplay; | |
| this.play = function( sound ) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Location[] points = new Location[20]; | |
| int myX, myY, myZ; | |
| int radius = 100; | |
| void setup() { | |
| size( 640, 640, P3D); | |
| //frameRate(25); | |
| createPoints(); | |
| noFill(); | |
| strokeWeight( 1 ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class Location { | |
| //float x, y, z; | |
| PVector v; | |
| float aa, ab, va, vb; | |
| float r; | |
| int c = 0; | |
| boolean alive = true; | |
| Location (float myX, float myY, float myZ, float aA, float aB, int index) { | |
| v = new PVector( myX, myY, myZ ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Services = function( _p ) { | |
| self = this; | |
| parent = _p; | |
| this.services = { | |
| "cl.ly": "cloudapp", | |
| "www.dropbox.com": "dropbox" | |
| } | |
| this.events = { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // | |
| // FillCircle.m | |
| // cramera | |
| // | |
| // Created by Chris Allick on 1/30/13. | |
| // Copyright (c) 2013 Chris Allick. All rights reserved. | |
| // | |
| #import "FillCircle.h" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| result.entities.urls[0].expanded_urlfetch = function(query) { | |
| var script_tag = document.createElement("script"); | |
| script_tag.id = "fetcher"; | |
| script_tag.src = "https://search.twitter.com/search.json"+query+"&callback=parse"; | |
| document.body.appendChild(script_tag); | |
| } | |
| parse = function(data) { | |
| document.body.removeChild(document.getElementById("fetcher")); | |
| if( data && data.results ) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| -(void)sendTwitter { | |
| ACAccountStore *account = [[ACAccountStore alloc] init]; | |
| ACAccountType *accountType = [account accountTypeWithAccountTypeIdentifier: | |
| ACAccountTypeIdentifierTwitter]; | |
| [account requestAccessToAccountsWithType:accountType options:nil completion:^(BOOL granted, NSError *error) { | |
| if (granted == YES) { | |
| NSArray *arrayOfAccounts = [account accountsWithAccountType:accountType]; | |
| if ([arrayOfAccounts count] > 0) { | |
| twitterAccount = [arrayOfAccounts lastObject]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| double delayInSeconds = 1.0; | |
| dispatch_time_t popTime = dispatch_time(DISPATCH_TIME_NOW, delayInSeconds * NSEC_PER_SEC); | |
| dispatch_after(popTime, dispatch_get_main_queue(), ^(void){ | |
| //code to be executed on the main queue after delay | |
| sendButton.frame = CGRectMake(0, self.view.frame.size.height-(191*.5), 640*.5, 191*.5); | |
| CGRect frame = sendingLabel.frame; | |
| frame.origin.y = -30 - frame.size.height; | |
| [sendingLabel setFrame:frame]; | |
| for (id subview in self.view.subviews) { |