Skip to content

Instantly share code, notes, and snippets.

@carloespinosa
carloespinosa / introrx.md
Created July 19, 2016 04:42 — forked from staltz/introrx.md
The introduction to Reactive Programming you've been missing
//////////////////////push_notifications.js///////////////////////
var apns = function(){
var pref = require('preferences').preferences;
Titanium.Network.registerForPushNotifications({
types: [
Titanium.Network.NOTIFICATION_TYPE_BADGE,
Titanium.Network.NOTIFICATION_TYPE_ALERT
],
success:function(e)
/**
* called when an item in the ListView is clicked; we will get the section
* index, and addition event information
*
* @param {Object} _event
*/
function loadMoreBtnClicked(_event) {
alert('not implemented yet');
}
@carloespinosa
carloespinosa / deploy.rb
Created December 3, 2012 10:53 — forked from benmoss/deploy.rb
Configuring a remote sphinx server with Thinking Sphinx
# deploy.rb
namespace :ts_remote do
task :conf do
run <<-CMD
cd #{current_release}
&&
RAILS_ENV=#{rails_env} rake ts:conf
&&
rsync --progress #{current_release}/config/#{rails_env}.sphinx.conf sphinxsearch@db-server:/home/sphinxsearch/