Public Gists by nesquena

gist: 236787 Minimalistic Padrino app
Gravatar
Tue Nov 17 01:30:26 -0800 2009
1
2
3
class Demo < Padrino::Application
  map(:hello).to("/")
  get :hello do
gist: 236784 Simple Padrino App 1
Gravatar
Tue Nov 17 01:14:41 -0800 2009
1
2
3
clear_sources
source 'http://gemcutter.org'
gem 'sinatra', :require_as => 'sinatra/base'
Gravatar
Thu Nov 12 12:46:48 -0800 2009
1
2
3
# in models
class Person
  def something_expensive
Gravatar
Thu Nov 12 12:23:47 -0800 2009
1
2
3
namespace :admin do
  get :show do
    ...
Gravatar
Tue Nov 03 06:38:47 -0800 2009
1
2
3
var TodoList = Behavior.create({
  initialize : function() {
    // when the behavior is applied
Gravatar
Thu Oct 29 17:04:00 -0700 2009
1
2
3
class Application < Sinatra::Base
  register SinatraMore::MarkupPlugin
  register SinatraMore::RenderPlugin
gist: 217481 Exercise to write a sass mi...
Gravatar
Sat Oct 24 04:17:46 -0700 2009
1
2
3
# Better to use the hassle gem
# http://github.com/pedro/hassle
 
Gravatar
Thu Oct 08 18:49:13 -0700 2009
1
2
3
# formats any message properly for html display by truncating link captions, breaking up long words
# and converting newlines to breaks
def formatted_message(message_text)
Gravatar
Mon Sep 28 04:28:53 -0700 2009
1
2
3
namespace :gems do
  desc "Spit out gems.yml and .gems in root of app (for Heroku + EY etc.)"
  task :specify => :environment do
Gravatar
Mon Sep 28 04:27:50 -0700 2009

      
Gravatar
Mon Sep 28 04:26:10 -0700 2009

      
Gravatar
Tue Sep 22 22:29:43 -0700 2009
1
2
3
# http://tomafro.net/2009/09/quickly-list-missing-foreign-key-indexes
 
c = ActiveRecord::Base.connection
Gravatar
Wed Sep 16 03:24:55 -0700 2009
1
2
3
VC Pitch Deck
=============
 
Gravatar
Mon Sep 14 23:05:29 -0700 2009
1
2
3
=begin
 
 This is a file that will extend the "page" object in a javascript rjs view with new methods that will enhance
Gravatar
Sun Sep 13 23:50:35 -0700 2009
1
2
3
Remote.Base = {
  initialize : function(options) {
    this.options = Object.extend({
Gravatar
Tue Aug 18 18:45:22 -0700 2009
1
2
3
    create_table :stores do |t|
      t.string :auth_key
      t.string :contact_name, :section_name
Gravatar
Thu Aug 13 19:55:23 -0700 2009
1
2
3
namespace :db do
  namespace :indexes do
    desc "Prints a list of unindexed foreign keys so you can index them"
Gravatar
Sat Aug 08 15:21:39 -0700 2009
1
2
3
desc "Generate and deploy assets"
task :deploy_assets, :roles => :app do
  # get the previous timestamp
Gravatar
Mon Aug 03 04:57:55 -0700 2009
1
2
3
- form_tag '/login' do
  .flash= flash[:notice]
  %p
Gravatar
Mon Jul 27 02:11:12 -0700 2009
1
2
3
# For rails, running memcache in development mode
# check if memcached is running; if it is, enable caching
# To start use $ memcached -m 64 -l 127.0.0.1 -p 11211 -vv -u root