- search works far better
- account switching works really well
- autocomplete of addressing other users is not buggy in Slack
- up arrow history
- proper editing of messages
little things
/* id styling has widespread effects */ | |
#site a { padding-left: 10px; } | |
/* does nothing */ | |
li a { padding-left: 10px; } | |
/* also does nothing */ | |
.sidebar li:first a { padding-left: 10px; } |
drop table pod_markets; | |
drop table pod_sections; | |
drop table pods; | |
drop table feature_pods; | |
drop table promotion_pods; | |
drop table getaway_pods; | |
drop table activity_pods; | |
drop table gear_pods; | |
drop table journal_pods; | |
drop table filter_group_pods; |
- cache [@current_market, MarketPod.get_in_shape.name, get_in_shape_pods.max_by(&:updated_at)] do | |
.module-header | |
%h3 | |
Get in Shape | |
%a.button.button-see-all-white{href: products_path} | |
See All | |
%ul.clearfix | |
- if get_in_shape_pods.present? | |
- pod = get_in_shape_pods[0] | |
- cache [MarketPod.get_in_shape.name, "small-pod", pod] do |
require 'rubygems' | |
require 'active_record' | |
desc 'migrate legacy table to add column' | |
namespace :document_manager do | |
namespace :db do | |
task :migrate do | |
ActiveRecord::Base.clear_active_connections! | |
configs = open('config/database.yml') { |f| YAML.load(f) } | |
ActiveRecord::Base.logger = Logger.new(STDOUT) |
#calling view | |
<%= growl4rails_includes(3000, 5) %> | |
<%= | |
periodically_call_remote( | |
:url => '/foos/loading_statuses.js', | |
:frequency => '4', | |
:complete => "request", | |
:method => 'GET' | |
) |
find . -name "* *"|while read file | |
do | |
echo "$file" | |
mv "$file" "`echo "$file"| awk ' BEGIN {OFS="_"} $1=$1 '`" | |
done | |
#!/usr/bin/env ruby | |
# Find common Twitter friends | |
# Usage: ./twat.rb user1 user2 ... | |
lists = ARGV.inject({}) do |hash, username| | |
page = 0 | |
while !(output = `curl -s http://twitter.com/statuses/friends/#{username}.xml?page=#{page += 1} | grep "<screen_name>"`.gsub(%r{</?screen_name>}, '').split).empty? | |
hash[username] = ((hash[username] || []) + output).sort | |
end | |
hash |
namespace :db do | |
desc 'Drops and recreates the database from db/schema.rb for the current environment and loads the seeds.' | |
task :reset => [ 'db:drop', 'db:setup' ] | |
desc 'Create the database, load the schema, and initialize with the seed data' | |
task :setup => [ 'db:create', 'db:schema:load', 'db:seed' ] | |
desc 'Load the seed data from db/seeds.rb' | |
task :seed => :environment do | |
seed_file = File.join(Rails.root, 'db', 'seeds.rb') |
#!/usr/bin/env ruby | |
require "cgi" | |
require 'active_record' | |
ActiveRecord::Base.establish_connection( | |
:adapter => , | |
:database => , | |
:username => , | |
:password => , | |
:host => |