Skip to content

Instantly share code, notes, and snippets.

View amrnt's full-sized avatar

Amr Tamimi amrnt

View GitHub Profile
require('rubygems')
gem('twitter4r', '0.3.1')
require('twitter')
require('twitter/console')
login = 'TWITTER_USERNAME'
password = 'TWITTER_PSSWORD'
@@client = Twitter::Client.new(:login => login, :password => password)
require('rubygems')
gem('twitter4r', '0.3.1')
require('twitter')
require('twitter/console')
login = 'TWITTER_LOGIN'
password = 'TWITTER_PASWORD'
friend = 'twitbrain'
client = Twitter::Client.new(:login => login, :password => password)
<r:random>
<r:option><r:assets:image title="welcome-main-ar" /></r:option>
<r:option><r:assets:image title="welcome-main-en" /></r:option>
<r:option><r:assets:image title="welcome-main-es" /></r:option>
<r:option><r:assets:image title="welcome-main-it" /></r:option>
</r:random>
/*
* Easy Slider 1.7 - jQuery plugin
* written by Alen Grakalic
* http://cssglobe.com/post/4004/easy-slider-15-the-easiest-jquery-plugin-for-sliding
*
* Copyright (c) 2009 Alen Grakalic (http://cssglobe.com)
* Dual licensed under the MIT (MIT-LICENSE.txt)
* and GPL (GPL-LICENSE.txt) licenses.
*
* Built for jQuery library
---
- - !ruby/object:Period
attributes:
created_at: 2010-02-22 20:36:58
updated_at: 2010-02-22 20:36:58
end_at: 2010-02-01 03:00:00
start_at: 2010-02-01 01:00:00
id: "1"
show_id: "1"
attributes_cache:
Processing Admin::ArticlesController#new (for 213.6.218.223 at 2010-02-24 22:15:42) [GET]
Parameters: {"action"=>"new", "controller"=>"admin/articles"}
^[[4;35;1mSite Load (0.2ms)^[[0m ^[[0mSELECT * FROM `sites` WHERE (`sites`.`host` = 'rushthinking.com') LIMIT 1^[[0m
^[[4;36;1mUser Load (0.7ms)^[[0m ^[[0;1mSELECT distinct users.*, memberships.admin as site_admin FROM `users` left outer join memberships on users.id = memberships.user_id WHERE (users.id = 1 and (memberships.site_id = 1 or users.admin = 1)) AND (users.deleted_at IS NULL OR users.deleted_at > '2010-02-24 22:15:42') ORDER BY users.login LIMIT 1^[[0m
^[[4;35;1mAsset Load (0.1ms)^[[0m ^[[0mSELECT * FROM `assets` WHERE (`assets`.site_id = 1 AND (parent_id is null)) ORDER BY created_at desc LIMIT 15^[[0m
^[[4;36;1mAsset Load (0.1ms)^[[0m ^[[0;1mSELECT * FROM `assets` WHERE (`assets`.`id` = 7 AND (`assets`.site_id = 1 AND (parent_id is null))) ORDER BY created_at desc^[[0m
Rendering /home/deploy/apps/mephisto/public/404.html (not_fou
<style>
td{
width:20px;
}
td.movie-area{
color: #fff;
background: #000;
}
.h0{
-from = 12.00
-to = 23.00
%table.time-table
%tr
%th &nbsp;
-h = from
-until h >= to do
%th{ :colspan => 4 }= h
-h+=1
class Period < ActiveRecord::Base
belongs_to :show
def show_date
start_at.nil? ? Time.now.to_date : start_at.to_date
end
def start_at_time
start_at.nil? ? Time.now.to_time : start_at.to_time
end
def end_at_time
<div class="group">
<%= f.label :show_id, "Show", :class => :label %>
<%= f.collection_select :show_id, @shows.collect, :id, :name %>
<span class="description">Select the show</span>
</div>
<div class="group">
<%= f.label :show_date, "Date at", :class => :label %>
<%= f.date_select :show_date, :class => 'datetime_select' %>
<span class="description">Date of the show</span>