Skip to content

Instantly share code, notes, and snippets.

View test.rb
puts 'hello world'
Schwad / gems.rb
Created September 7, 2022 09:45 — forked from kddnewton/gems.rb
Extract the latest versions of each Ruby gem on your system
View gems.rb
# frozen_string_literal: true
require "rubygems/package"
require "net/http"
require "tmpdir"
queue = do |source, gems|
gems.each do |tuple|
gem_name = File.basename(tuple.spec_name, ".gemspec")
Schwad / Comment
Created August 18, 2022 11:51 — forked from glaville/Comment
View Comment
With the last fixes, scaffold_extensions work for this example, but override layout of the other Ramaze::Controller in the same Ramaze::App
- /foo should use /layout/foo.xhtml as layout, and be renderer an a gray background
- /f/forum should use /layout/foo.xhtml as well
The problem seems to be linked to the fact the Ramaze adapter now updates the *existing containing Ramaze::App* with its own path (here, default one and :forum) and affect as such any other controller in theses Apps.
Schwad /
Created September 24, 2021 16:53 — forked from wh1tney/
How to deploy a static website to Heroku


This is a quick tutorial explaining how to get a static website hosted on Heroku.

Why do this?

Heroku hosts apps on the internet, not static websites. To get it to run your static portfolio, personal blog, etc., you need to trick Heroku into thinking your website is a PHP app. This 6-step tutorial will teach you how.

Basic Assumptions

Schwad / Result
Created August 21, 2021 14:41 — forked from chuyeow/Result
View Result
$ ./hpricot_vs_nokogiri.rb
user system total real
hpricot:doc 0.230000 0.010000 0.240000 ( 0.265904)
nokogiri:doc 0.030000 0.010000 0.040000 ( 0.041641)
user system total real
hpricot:xpath 1.050000 0.020000 1.070000 ( 1.114454)
nokogiri:xpath 0.210000 0.010000 0.220000 ( 0.226418)
user system total real
hpricot:css 1.140000 0.030000 1.170000 ( 1.339635)
nokogiri:css 0.700000 0.010000 0.710000 ( 0.835559)
View allstar.rb
class NilClass
def method_missing(method, *args)
Somebody once told me the world is gonna roll me
I ain't the sharpest tool in the shed
She was looking kind of dumb with her finger and her thumb
In the shape of an "L" on her forehead
Well, the years start coming and they don't stop coming
Fed to the rules and I hit the ground running
Didn't make sense not to live for fun
Schwad / destroyer.rb
Last active November 25, 2019 14:30
@apotonick Tesla Truck implementation
View destroyer.rb
module Tesla
module Truck
module Destroyer
puts "Das #{human_name} wurde zerstört."

Keybase proof

I hereby claim:

  • I am schwad on github.
  • I am schwad ( on keybase.
  • I have a public key whose fingerprint is 3C9A 6DC1 2573 C25F BE23 22FF AB00 9D50 E34A E076

To claim this, I am signing this object:

Schwad /
Last active February 6, 2019 14:56 — forked from fantactuka/
Update Chrome driver for mac os to 2.46
# bash < <(curl -s
echo "Updating Chrome Driver"
sudo su
if [ -e /usr/bin/chromedriver ]; then
rm /usr/bin/chromedriver
echo "Removing current Chrome Driver from /usr/bin"