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
#=============================================================================== | |
# Filename: boost.sh | |
# Author: Pete Goodliffe | |
# Copyright: (c) Copyright 2009 Pete Goodliffe | |
# Licence: Please feel free to use this, with attribution | |
# Modified version | |
#=============================================================================== | |
# | |
# Builds a Boost framework for the iPhone. | |
# Creates a set of universal libraries that can be used on an iPhone and in the |
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
var http = require('http') | |
http.createServer(function (req,res) { | |
res.writeHead(200, {'Content-Type':'text/plain'}); | |
res.end('Hello World! \n'); | |
}).listen(1337,"127.0.0.1"); | |
console.log('Server running ar http://127.0.0.1:1337//'); |
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
var http = require('http'); | |
var url = require('url'); | |
var fs = require('fs'); | |
var newPostFormHTML = fs.readFileSync('views/post/new.html'); | |
function renderNewPostForm(request, response) { | |
response.writeHead(200, { | |
'Content-type': 'text/html; charset=utf-8' | |
}); |
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
mib[0] = CTL_KERN; | |
mib[1] = KERN_PROC; | |
mib[2] = KERN_PROC_ALL; | |
mib[3] = 0; | |
ret = sysctl(mib, 4, NULL, &size, NULL, 0); | |
procs = malloc(size); | |
ret = sysctl(mib, 4, procs, &size, NULL, 0); /* procs is struct kinfo_proc.*/ |
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
#import <sys/sysctl.h> | |
- (NSArray *)runningProcesses { | |
int mib[4] = {CTL_KERN, KERN_PROC, KERN_PROC_ALL, 0}; | |
size_t miblen = 4; | |
size_t size; | |
int st = sysctl(mib, miblen, NULL, &size, NULL, 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
#include <sys/types.h> | |
#include <sys/sysctl.h> | |
@interface UIDevice(Hardware) | |
- (NSString *) platform; | |
- (BOOL)hasRetinaDisplay; | |
- (BOOL)hasMultitasking; |
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
//If it dont simulator : | |
#if !TARGET_IPHONE_SIMULATOR | |
#endif |
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
#pragma mark - UIPickerViewDelegate methods | |
- (void)pickerView:(UIPickerView *)pickerView didSelectRow:(NSInteger)row inComponent:(NSInteger)component | |
{ | |
} | |
#pragma mark - UIPickerViewDataSource methods | |
- (UIView *)pickerView:(UIPickerView *)pickerView viewForRow:(NSInteger)row forComponent:(NSInteger)component reusingView:(UIView *)view | |
{ | |
} |
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
// | |
// DetailViewController.h | |
// youtubedemo | |
// | |
// Created by Your Name on 4/24/12. | |
// Copyright (c) 2012 Company Name. All rights reserved. | |
// | |
#import <UIKit/UIKit.h> |
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
// Start here https://developers.facebook.com/docs/getting-started/getting-started-with-the-ios-sdk/ | |
// Install the Facebook SDK, get it linked up, create an app, and get that setup correctly | |
// in your info.plist, appDelegate, and build settings. | |
//Note: This example uses ARC. If you aren't using ARC, made sure to release/retain objects as needed. | |
//Now for the fun part. | |
//////////////////////////// |
OlderNewer