This script is for OSX only! ;)
First install terminal-notifier app:
brew install terminal-notifier
After that, using this awesome scritp with some customizations in your .emacs.
| # encoding: utf-8 | |
| class User < AcriveRecord::Base | |
| has_many :suggestions | |
| end | |
| class Product < AcriveRecord::Base | |
| has_many :suggestions | |
| end | |
| class Suggestion < AcriveRecord::Base | 
| gistsource 'https://rubygems.org' | |
| gem 'rails', '3.2.13' | |
| gem 'mysql2' | |
| gem 'devise' | |
| gem 'devise-i18n' | |
| group :assets do | |
| gem 'sass-rails', '~> 3.2.3' | |
| gem 'coffee-rails', '~> 3.2.1' | 
| source 'https://rubygems.org' | |
| gem 'rails', '3.2.13' | |
| gem 'mysql2' | |
| gem 'devise' | |
| gem 'devise-i18n' | |
| group :assets do | |
| gem 'sass-rails', '~> 3.2.3' | 
| tell application "Adium" | |
| set eu to "[email protected]" | |
| set gay to text returned of ¬ | |
| (display dialog ¬ | |
| "Quem é o Gay?" with title ¬ | |
| "Putz! Que viadão!" with icon stop ¬ | |
| default answer ¬ | |
| "" buttons {"Vai…"} ¬ | |
| default button 1) | |
| tell account eu to set theChat to make new chat with contacts {contact gay} with new chat window | 
| <% [:notice, :error, :alert].each do |level| %> | |
| <% unless flash[level].blank? %> | |
| <div class="alert <%= flash_class(level) %>"> | |
| <a class="close" href="#">×</a> | |
| <%= content_tag :p, flash[level] %> | |
| </div> | |
| <% end %> | |
| <% end %> | 
| class Followings < ActiveRecord::Base | |
| attr_accessible :user_id, :follower_id | |
| belongs_to :user | |
| belongs_to :follower, class_name: 'User' | |
| belongs_to :following, class_name: 'User', foreign_key: :user_id | |
| validates_uniqueness_of :user_id, scope: :follower_id | |
| end | 
| def mod11(number, total) | |
| as_string = number.to_s | |
| sub = as_string.length | |
| value = 0 | |
| max = total | |
| sub.times do |t| | |
| value += as_string[t].to_i * max | |
| max = max - 1 | |
| end | 
This script is for OSX only! ;)
First install terminal-notifier app:
brew install terminal-notifier
After that, using this awesome scritp with some customizations in your .emacs.
| -- show running queries (pre 9.2) | |
| SELECT procpid, age(query_start, clock_timestamp()), usename, current_query | |
| FROM pg_stat_activity | |
| WHERE current_query != '<IDLE>' AND current_query NOT ILIKE '%pg_stat_activity%' | |
| ORDER BY query_start desc; | |
| -- show running queries (9.2) | |
| SELECT pid, age(query_start, clock_timestamp()), usename, query | |
| FROM pg_stat_activity | |
| WHERE query != '<IDLE>' AND query NOT ILIKE '%pg_stat_activity%' | 
| #!/bin/bash | |
| set -eou pipefail | |
| version=8.6.4.1 | |
| patchinfo=299124-linux-x86_64-threaded | |
| dir=ActiveTcl$version.$patchinfo | |
| package=$dir.tar.gz | |
| url=http://downloads.activestate.com/ActiveTcl/releases/$version/$package |