This file contains 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 ) writeTextFile : ( NSString * ) fileName withContents : ( NSString * ) contents | |
{ | |
NSArray * directories; | |
NSDate * now; | |
NSDateFormatter * formatter; | |
NSError * error; | |
NSFileManager * manager; | |
NSMutableString * append; | |
NSMutableString * path; | |
This file contains 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
- ( NSString * ) readTextFile : ( NSString * ) fileName | |
{ | |
NSArray * directories; | |
NSData * buffer; | |
NSFileHandle * handle; | |
NSFileManager * manager; | |
NSMutableString * path; | |
NSString * contents; | |
manager = [NSFileManager defaultManager]; |
This file contains 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
- ( NSString * ) locateFileOnDesktop : ( NSString * ) fileName | |
{ | |
NSArray * directories; | |
NSFileManager * manager; | |
NSMutableString * path; | |
manager = [NSFileManager defaultManager]; | |
directories = NSSearchPathForDirectoriesInDomains( NSDesktopDirectory, NSUserDomainMask, YES ); | |
path = [[NSMutableString alloc] initWithString : [directories objectAtIndex : 0]]; |
This file contains 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
- ( NSString * ) specificFilePath : ( NSString * ) path | |
{ | |
NSFileManager * manager; | |
manager = [NSFileManager defaultManager]; | |
// path = @"~/Desktop/colors.json"; | |
path = [path stringByStandardizingPath]; | |
NSLog( @"%@", path ); | |
This file contains 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 ) currentWorkingDirectory | |
{ | |
NSFileManager * manager; | |
manager = [NSFileManager defaultManager]; | |
NSLog( @"%@", [manager currentDirectoryPath] ); | |
} |
This file contains 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
// Libraries | |
#include <Bridge.h> | |
#include <YunClient.h> | |
// Defines | |
// Used for connectivity parameters | |
#define ENDPOINT "kaazing.kevinhoyt.com" | |
#define LOGIN " " | |
#define PASSCODE " " | |
#define PORT 61613 |
This file contains 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
[default] | |
output = json | |
region = us-east-1 | |
aws_access_key_id = __YOUR_KEY_ID__ | |
aws_secret_access_key = __YOUR_SECRET_KEY__ |
This file contains 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
# AWS Python library | |
import boto | |
# Hidden password input | |
import getpass | |
# Unique file name | |
import tempfile | |
# OS-level chmod access |
This file contains 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
// Libraries | |
#include <Bridge.h> | |
#include <Console.h> | |
#include <YunClient.h> | |
// Connectivity parameters | |
#define ENDPOINT "kaazing.kevinhoyt.com" | |
#define LOGIN " " | |
#define PASSCODE " " | |
#define PORT 61613 |
This file contains 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
// Original: | |
// http://hypernephelist.com/2014/08/19/https_on_arduino_yun.html | |
// Libraries | |
#include <Process.h> | |
// Literals | |
// #define DEBUG | |
// Constants |