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
ActiveRecord::Base.descendants.reject { |el| [User,Page].include?(el) }.each { |el| el.destroy_all("id > 10") }.map { |el| [el.count,el] } |
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
defaults write com.apple.systempreferences TMShowUnsupportedNetworkVolumes 1 |
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
#<NoMethodError: undefined method `[]' for nil:NilClass> | |
["/usr/local/rvm/gems/ruby-1.9.2-p320/gems/premailer-rails3-1.3.1/lib/premailer-rails3/css_loaders.rb:65:in `request_and_unzip'", | |
"/usr/local/rvm/gems/ruby-1.9.2-p320/gems/premailer-rails3-1.3.1/lib/premailer-rails3/css_loaders.rb:43:in `load'", | |
"/usr/local/rvm/gems/ruby-1.9.2-p320/gems/premailer-rails3-1.3.1/lib/premailer-rails3/css_helper.rb:44:in `block in load_css'", | |
"/usr/local/rvm/gems/ruby-1.9.2-p320/gems/premailer-rails3-1.3.1/lib/premailer-rails3/css_helper.rb:43:in `each'", | |
"/usr/local/rvm/gems/ruby-1.9.2-p320/gems/premailer-rails3-1.3.1/lib/premailer-rails3/css_helper.rb:43:in `load_css'", | |
"/usr/local/rvm/gems/ruby-1.9.2-p320/gems/premailer-rails3-1.3.1/lib/premailer-rails3/css_helper.rb:22:in `css_for_doc'", | |
"/usr/local/rvm/gems/ruby-1.9.2-p320/gems/premailer-rails3-1.3.1/lib/premailer-rails3/premailer.rb:14:in `initialize'", | |
"/usr/local/rvm/gems/ruby-1.9.2-p320/gems/premailer-rails3-1.3.1/lib/premailer-rails3/hook.rb:18:in `new'", |
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
# Install prerequsites | |
# NOTE: libffi version >= 3.0.5 | |
yum install libxml2-devel libxslt-devel gnutls libicu-devel libffi-devel | |
# Download source codes | |
svn co http://svn.gna.org/svn/gnustep/modules/cor | |
# Install gnu-make | |
cd make | |
./configure && make && make install |
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
{ | |
"before": "5aef35982fb2d34e9d9d4502f6ede1072793222d", | |
"repository": { | |
"url": "http://github.com/defunkt/github", | |
"name": "github", | |
"description": "You're lookin' at it.", | |
"watchers": 5, | |
"forks": 2, | |
"private": 1, | |
"owner": { |
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
rm -f /var/lib/rpm/__db* | |
rpm –rebuilddb | |
yum clean all |
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
# Command to communicate with puppet | |
curl --cert /etc/puppet/ssl/certs/puppet..pem \ | |
--key /etc/puppet/ssl/private_keys/puppet..pem \ | |
--cacert /etc/puppet/ssl/ca/ca_crt.pem \ | |
-H 'Accept: yaml' \ | |
https://puppet.:8140/production/catalog/puppet-inv.local | |
# | |
# Paths | |
# |
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
# | |
# Purpose: Get content of file from Puppet catalog | |
# | |
# Usage: ruby file.rb args | |
# Args: | |
# | Name | Desc | Default | |
# ------------------------------------------ | |
# | node | | | |
# | path | \ | |
# | environment | production \ |
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
ActiveSupport::LogSubscriber.colorize_logging = false |
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
*fireplace.txt* Clojure REPL tease | |
Author: Tim Pope <http://tpo.pe/> | |
License: Same terms as Vim itself (see |license|) | |
This plugin is only available if 'compatible' is not set. | |
*fireplace* | |
You need Clojure runtime files to use this plugin. Try vim-clojure-static. |