Skip to content

Instantly share code, notes, and snippets.


Nicolas Mérouze nmerouze

View GitHub Profile
View gist:407623
var SplitView;
SplitView = {};
SplitView.masterButton = Ti.UI.createButton({
title: 'Open Window',
height: 50,
width: 200
SplitView.detailButton = Ti.UI.createButton({
title: 'Open Window',
height: 50,
View gist:308914
import com.mongodb.Mongo
import com.mongodb.DBCollection
import com.mongodb.BasicDBObject
import com.mongodb.DBObject
import com.mongodb.DBCursor
import com.mongodb.DB
import java.util.Set
import java.util.List
View environment_md.rb
config.gem "mongoid"
config.gem "mongo_session_store"
View controller.js
/* Requirements */
var scylla = require("scylla"),
ejsgi = require("ejsgi");
/* Controller */
var HomeController = {
index: function(req) {
View gist:299339
namespace :db do
desc "Migrate the database through scripts in db/migrate and update db/schema.rb by invoking db:schema:dump. Target specific version with VERSION=x. Turn off output with VERBOSE=false."
task :migrate => :environment do
ActiveRecord::Migration.verbose = ENV["VERBOSE"] ? ENV["VERBOSE"] == "true" : true
ActiveRecord::Migrator.migrate("db/migrate/", ENV["VERSION"] ? ENV["VERSION"].to_i : nil)
Rails.application.railties.engines.each do |engine|
ActiveRecord::Migrator.migrate(engine.root + "db/migrate/", ENV["VERSION"] ? ENV["VERSION"].to_i : nil)
Rake::Task["db:schema:dump"].invoke if ActiveRecord::Base.schema_format == :ruby
View Gemfile
gem "rails-cache", :require => "rails/cache", :path => "../rails-cache"
View step1.rb
require 'vendor/gems/environment'
require 'cramp/controller'
require 'uuid'
require 'mq'
Cramp::Controller::Websocket.backend = :thin
class TweetsController < Cramp::Controller::Websocket
View gist:278104
<!DOCTYPE html>
<title>Page Title</title>
<meta charset="utf-8" />
<script src=""></script>
$(function() {
var canvas = document.createElement("canvas");
var img = new Image();
View step1.html
<!DOCTYPE html>
<html lang="en">
<meta charset="utf-8" />
<script src="" type="text/javascript"></script>
<script type="text/javascript">
function displayTweets(data) {
$.each(data.results, function(i, item) {
You can’t perform that action at this time.