First add your twitter username and password. Then server.rb and once it's started open websocket.html in your browser. You should see some tweets appear. If not take a look at the javascript console.
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
#!/bin/bash | |
### BEGIN INIT INFO | |
# Provides: APPLICATION | |
# Required-Start: $all | |
# Required-Stop: $network $local_fs $syslog | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: Start the APPLICATION unicorns at boot | |
# Description: Enable APPLICATION at boot time. | |
### END INIT INFO |
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
APP_ROOT = File.expand_path(File.dirname(File.dirname(__FILE__))) | |
RAILS_ROOT = APP_ROOT | |
if ENV['MY_RUBY_HOME'] && ENV['MY_RUBY_HOME'].include?('rvm') | |
begin | |
rvm_path = File.dirname(File.dirname(ENV['MY_RUBY_HOME'])) | |
rvm_lib_path = File.join(rvm_path, 'lib') | |
#$LOAD_PATH.unshift rvm_lib_path | |
require 'rvm' | |
RVM.use_from_path! APP_ROOT |
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
#!/bin/sh | |
# | |
# init.d script for single or multiple unicorn installations. Expects at least one .conf | |
# file in /etc/unicorn | |
# | |
# Modified by [email protected] http://github.com/jaygooby | |
# based on http://gist.github.com/308216 by http://github.com/mguterl | |
# | |
## A sample /etc/unicorn/my_app.conf | |
## |
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
int port = 2195; | |
String hostname = "gateway.sandbox.push.apple.com"; | |
//load certificate | |
string certificatePath = @"cert.p12"; | |
string certificatePassword = ""; | |
X509Certificate2 clientCertificate = new X509Certificate2(certificatePath, certificatePassword); | |
X509Certificate2Collection certificatesCollection = new X509Certificate2Collection(clientCertificate); | |
TcpClient client = new TcpClient(hostname, port); |
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
// App Information | |
#define AppName [[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleName"] | |
#define AppVersion [[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleVersion"] | |
#define AppDelegate(type) ((type *)[[UIApplication sharedApplication] delegate]) | |
#define NSAppDelegate(type) ((type *)[[NSApplication sharedApplication] delegate]) | |
#define SharedApp [UIApplication sharedApplication] | |
#define NSSharedApp [NSApplication sharedApplication] | |
#define Bundle [NSBundle mainBundle] | |
#define MainScreen [UIScreen mainScreen] |
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 <dispatch/dispatch.h> | |
typedef void (^MHChannelsBlock)(id sender, NSDictionary *dictionary); | |
/*! | |
* A "channel" is like a private NSNotificationCenter between just two objects | |
* (although more are possible). | |
* | |
* Instead of making your objects, such as two view controllers, communicate |
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
namespace :ubuntu do | |
desc "Setup Environment" | |
task :setup_env, :roles => :app do | |
update_apt_get | |
install_dev_tools | |
install_git | |
install_subversion | |
install_sqlite3 | |
# Install and setup RVM instead of old Rails stack | |
#install_rails_stack |
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
# Redis configuration file example | |
# Note on units: when memory size is needed, it is possible to specifiy | |
# it in the usual form of 1k 5GB 4M and so forth: | |
# | |
# 1k => 1000 bytes | |
# 1kb => 1024 bytes | |
# 1m => 1000000 bytes | |
# 1mb => 1024*1024 bytes | |
# 1g => 1000000000 bytes |
OlderNewer