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
| #include <stdio.h> | |
| int main() | |
| { | |
| printf("Hello, World!\n"); | |
| } |
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
| if (ACTIVE && key) { | |
| // Takeoff | |
| if (key.name === 't') { | |
| try { | |
| d.takeOff(function() { | |
| console.log('[INFO] Rolling Spider take-off completed'.green); | |
| }); | |
| } catch(err) { | |
| console.log('[ERROR] '.red + err.red); | |
| } |
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
| 'use strict'; | |
| var keypress = require('keypress'); | |
| var Drone = require('rolling-spider'); | |
| var colors = require('colors'); | |
| // Change this with your drone name... | |
| var DRONE_NAME = 'RS_W123456'; | |
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
| # Running on iPhone 5s | |
| xcodebuild test -scheme YOUR_PROJECT_NAME -destination 'platform=iOS Simulator,name=iPhone 5s' |
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
| <?php | |
| // From a StackOverflow answer... | |
| // I can't find the original link :-( | |
| class StringEncryption { | |
| const ENCRYPTION_KEY = "She's a killer queeeeeeeeen!"; | |
| public function encode($url = '') { | |
| return base64_encode(mcrypt_encrypt(MCRYPT_RIJNDAEL_256, md5(self::ENCRYPTION_KEY), $url, MCRYPT_MODE_CBC, md5(md5(self::ENCRYPTION_KEY)))); | |
| } |
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
| - (BOOL)connectedToNetwork { | |
| NSURL* url = [[NSURL alloc] initWithString:@"http://google.com/"]; | |
| NSData* data = [NSData dataWithContentsOfURL:url]; | |
| if (data != nil) | |
| return YES; | |
| return NO; | |
| } |
NewerOlder