Skip to content

Instantly share code, notes, and snippets.

View evert0n's full-sized avatar
:octocat:

Everton Yoshitani evert0n

:octocat:
View GitHub Profile
#!/bin/bash
# nodejs - Startup script for node.js server
# chkconfig: 35 85 15
# description: node is an event-based web server.
# processname: node
# server: /path/to/your/node/file.js
# pidfile: /var/run/nodejs.pid
#
/*
Copyright (C) 2011 Colin Faulkingham, http://3a2d29.com/
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
var getObj = {
a: {
foo: 1,
bar: 2
}
};
var objectPath = function(obj, path, value, options){
path = typeof path == 'string' ? path.split('.') : path;
var key = path.shift()
#import "AppDelegate.h"
#import <Parse/Parse.h>
#import <FacebookSDK/FacebookSDK.h>
#import "MyParseUser.h"
@implementation AppDelegate
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
[[UINavigationBar appearance] setBarStyle:UIBarStyleBlackTranslucent];
var homeModule = angular.module('HomeModule', []);
homeModule.filter('titleCase', function () {
return function (input) {
var words = input.split(' ');
for (var i = 0; i < words.length; i++) {
words[i] = words[i].charAt(0).toUpperCase() + words[i].slice(1);
}
return words.join(' ');
}
set -e
# Clean up previous test
rm log.log || true
rm -rf .git .hg .bup
# Specify how our file is going to be constructed
NUMS="00 01 02 03 04 05 06 07 08 09"
F1="00 "
F2="00 01 02 "
// Call facebook API to verify the token is valid
// https://graph.facebook.com/me?access_token=$token
function verifyFacebookUserAccessToken(token) {
var deferred = Q.defer();
var path = 'https://graph.facebook.com/me?access_token=' + token;
request(path, function (error, response, body) {
var data = JSON.parse(body);
if (!error && response && response.statusCode && response.statusCode == 200) {
var user = {
facebookUserId: data.id,
web: node server.js

Business Models

Advertising

Models Examples
Display ads Yahoo!
Search ads Google