This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/ruby | |
#based off jhawthorn's python generic_nofity.py | |
require 'net/http' | |
def send_notify(ticker, title, body) | |
if Weechat.config_get_plugin('account_name') == "" | |
return Weechat::WEECHAT_RC_OK | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Foo::Bar < ActiveRecord::Base | |
end | |
class Foo::Bar::Lols < ActiveRecord::Base | |
end | |
Routes.draw do | |
namespace :foo do | |
resources :bars do | |
resources :lols |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
config.to_prepare do | |
# Load application's model / class decorators | |
['lib', 'app'].each do |dir| | |
Dir.glob(File.join(File.dirname(__FILE__), "../#{dir}/**/*_decorator*.rb")) do |c| | |
Rails.configuration.cache_classes ? require(c) : load(c) | |
end | |
end | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Foo | |
def hello | |
puts "Original Method" | |
puts caller(1) | |
end | |
end | |
class HijackStuff | |
def hijack | |
Foo.class_eval do |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
=> {"org"=> | |
{"mpris"=>{"MediaPlayer2"=>{}}, | |
"gnome"=> | |
{"Rhythmbox3"=> | |
{"menus"=>{"appmenu"=>{}}, | |
"window"=>{"1"=>{}}, | |
"PlayQueue"=>{}, | |
"RhythmDB"=>{}, | |
"PlaylistManager"=>{}}}}} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Paperclip.interpolates :s3_path_prefix do |attachment, style| | |
attachment.instance.s3_path_prefix | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
*** Checking out gnome-shell *** [1/1] | |
git remote set-url origin git://git.gnome.org/gnome-shell | |
git remote update origin | |
Fetching origin | |
git rebase origin/master | |
Current branch master is up to date. | |
git submodule init | |
git submodule update | |
*** Configuring gnome-shell *** [1/1] | |
./autogen.sh --prefix /opt/gnome --libdir '/opt/gnome/lib' --enable-compile-warnings=maximum --disable-glibtest |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module AuthenticationHelpers | |
def sign_in_as!(user) | |
visit '/store/login' | |
fill_in 'Email', :with => user.email | |
fill_in 'Password', :with => 'secret' | |
click_button 'Login' | |
end | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
user = User.create! | |
announcement = Announcement.create! | |
user.user_news << UserNews.create! subject: announcement |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/server add frt freerunningtech.irc.grove.io/6697 -ssl | |
/set irc.server.frt.password freerunningtech | |
/set irc.server.frt.ssl_verify no | |
/set irc.server.frt.username "clarke" | |
/set irc.server.frt.command "/msg NickServ identify ******": |
OlderNewer