Nice status buttons you can add to your README file in your Github repositories to show your project’s current status, fetched from StillMaintained:
For a live demo, check out StillMaintained’s own README.
def require_or_install(path, gem_name = path, version = '> 0') | |
require path | |
rescue LoadError | |
require 'rubygems' | |
require 'rubygems/user_interaction' | |
require 'rubygems/dependency_installer' | |
installer = Gem::DependencyInstaller.new | |
installer.install gem_name, version |
# | |
# A C Parser using the Parslet library. | |
# | |
# ANSI C Grammar: | |
# | |
# * http://www.lysator.liu.se/c/ANSI-C-grammar-l.html | |
# * http://www.lysator.liu.se/c/ANSI-C-grammar-y.html | |
# | |
require 'parslet' |
$ sudo su - | |
# mkdir /etc/resolver | |
# cat > /etc/resolver/test | |
nameserver 127.0.0.1 | |
port 2155 | |
^D | |
^D | |
$ brew install dnsmasq | |
$ dnsmasq --port=2155 --no-resolv --address=/.test/127.0.0.1 | |
$ ping foo.test |
require 'benchmark' | |
n = (ARGV.shift || 1000000).to_i | |
def append(words, n) | |
n.times { res = words.inject("") {|string, p| string << "#{p}_"} } | |
end | |
def join_under(words, n) | |
n.times { res = words.map{|s| s}.join("_") } |
Nice status buttons you can add to your README file in your Github repositories to show your project’s current status, fetched from StillMaintained:
For a live demo, check out StillMaintained’s own README.
def stat(args) | |
p :stat => args | |
end | |
def xtest(number) | |
p "number is: #{number}" | |
return false if number == 3 | |
return true | |
end |
require 'rubygems' | |
require 'rack' | |
class Object | |
def webapp | |
class << self | |
define_method :call do |env| | |
func, *attrs = env['PATH_INFO'].split('/').reject(&:empty?) | |
[200, {}, send(func, *attrs)] | |
end |
Take a look at the comments and code in update.sh
.
I use update-usr-local.sh
after a successful build to copy the new JVM into /usr/local
.
I add pickjdk.sh
into my ~/.bash_profile
to allow easy switching between multiple JVMs.
I use create_tarball.sh
to make a copy of the build to share.
PaaS: The good the bad and the ugly. | |
VMware will be hosting a technology meetup on Thursday night 11/11, at | |
the Newberry room, Hilton New Orleans Riverside, 6pm-8pm local time. | |
Join us for an open discussion where Engine Yard, Heroku and VMware | |
will share their experience of building a scalable PaaS solution. | |
What to expect? no slides, lots of beer and exciting debates. |