SSH into Root
$ ssh [email protected]
Change Root Password
################################# | |
# | |
# 本清单基于 ubuntu 12.04, | |
# | |
# 只是一个清单,不是一个可以安全执行的脚本 | |
# | |
################################# | |
# create a linode,login as root, and create a common user for all the tasks | |
ssh root@the_ip_of_this_linode |
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
def authorize!(role={}, object) | |
ability = Ability.new(current_user) | |
unless ability.can?(role, object) | |
unauthorized! | |
end | |
end |
directory "tmp" | |
file "tmp/hello.tmp" => "tmp" do | |
sh "echo 'Hello' > 'tmp/hello.tmp'" | |
end | |
task :default => 'morning:turn_off_alarm' | |
namespace :morning do | |
desc "Turn off alarm." |
#!/usr/bin/env ruby | |
# Please read http://otobrglez.opalab.com for more information about this code. | |
class Book < Struct.new(:title) | |
def words | |
@words ||= self.title.gsub(/[a-zA-Z]{3,}/).map(&:downcase).uniq.sort | |
end |
route = 8.0.0.0/255.0.0.0 | |
route = 58.0.0.0/255.0.0.0 | |
route = 23.0.0.0/255.0.0.0 | |
route = 117.0.0.0/255.0.0.0 | |
route = 199.0.0.0/255.0.0.0 | |
route = 190.0.0.0/255.0.0.0 | |
route = 198.0.0.0/255.0.0.0 | |
route = 173.0.0.0/255.0.0.0 | |
route = 174.0.0.0/255.0.0.0 | |
route = 168.0.0.0/255.0.0.0 |
cat log/production.log| grep "^Completed .* in [0-9]*ms .*" | sed "s/.* in \([0-9]*\)ms.*/\1/" | awk '{ s += $1 } END { print "sum: ", s, " average: ", s/NR, " samples: ", NR }' |
SSH into Root
$ ssh [email protected]
Change Root Password
require "rubygems" | |
require "bundler" | |
require_relative "lib/importer" | |
Bundler.setup | |
desc "Import from Trello board" | |
task :import do | |
Importer.new(File.dirname(__FILE__)).import ENV["ISSUE"] | |
end |
# .railsrc | |
-B #Skip Bundle | |
-T #Skip Test-Unit | |
-d postgresql #Use postgres |