Skip to content

Instantly share code, notes, and snippets.

View maltoe's full-sized avatar

Malte Rohde maltoe

View GitHub Profile
@maltoe
maltoe / google-link-extract.html
Created October 30, 2012 14:26
Extract links from google referrer
@maltoe
maltoe / gist:5204055
Created March 20, 2013 11:45
Take a snapshot from a website in memory
#!/bin/sh
echo "Starting up XServer in memory..."
#Xvfb :11 -screen 0 1920x1080x24 &
Xvfb :11 -screen 0 1680x1024x24 &
sleep 2
echo "Starting Chrome..."
#firefox --display :11
#firefox --display :11 "http://google.de/" &
@maltoe
maltoe / gist:5653245
Created May 26, 2013 16:23
git submodule loop :(
require 'fileutils'
FileUtils.mkdir_p('test')
Dir.chdir('test') do
['1', '2'].each do |i|
FileUtils.mkdir_p(i)
Dir.chdir(i) do
`git init`
`touch repo_#{i} && git add repo_#{i} && git commit -m 'initial commit'`
end
@maltoe
maltoe / one_spec.rb
Created May 28, 2013 12:08
Shared context / global config before hooks called in wrong order
require_relative 'spec_helper'
describe 'A' do
describe 'B', :a => :b do
it 'succeeds' do
puts 'succeeds'
end
end
end
@maltoe
maltoe / weird_libtool_behaviour.sh
Created October 7, 2013 16:18
Weird libtoolize behaviour with install.sh files in parent directories and chdir calls.
#!/bin/bash
mkdir weird_libtoolize_behaviour
cd weird_libtoolize_behaviour
mkdir works
cd works
git clone https://git.gitorious.org/openismus-playground/examplelib.git &>/dev/null
cd examplelib
./autogen.sh &>/dev/null
## app/controllers/application_controller.rb
class ApplicationController < ActionController::Base
@@silenced_actions = [:home]
def home
end
end
@maltoe
maltoe / rbx_compile_output.log
Created March 17, 2015 10:07
stacktrace for rubinius case-when issue
$ rbx compile test.rb >log 2>&1
Failed compiling test.rb
An exception occurred running compile:
undefined method `body' on an instance of CodeTools::AST::PushArgs. (NoMethodError)
Backtrace:
Kernel(CodeTools::AST::PushArgs)#body (method_missing) at kernel/delta/kernel.rb:78
begin
require 'bundler/inline'
rescue LoadError => e
$stderr.puts 'Bundler version 1.10 or later is required. Please update your Bundler'
raise e
end
gemfile(true) do
source 'https://rubygems.org'
gem 'rails', github: 'rails/rails'
@maltoe
maltoe / Gemfile
Last active November 18, 2016 16:43
dry-validation: array of hashes doesn't convey the nested input
source 'https://rubygems.org'
gem 'dry-validation'
build:
image: docker:20.10.7
services:
# hab dem auch mal einen alias gegeben, theoretisch muesste der als "docker" erreichbar sein
- docker:20.10.7-dind
variables:
# versucht mit oder ohne
DOCKER_DRIVER: overlay2
# versucht mit oder ohne (deaktiviert TLS)
DOCKER_TLS_CERTDIR: ""