Skip to content

Instantly share code, notes, and snippets.

Avatar

Pascal Widdershoven pascalw

View GitHub Profile
View keybase.md

Keybase proof

I hereby claim:

  • I am pascalw on github.
  • I am pascalw_kb (https://keybase.io/pascalw_kb) on keybase.
  • I have a public key ASD62ZZbiwFJNgkNZOiuoi7VUGYr3GBG1ue8CkQpHK3U3Qo

To claim this, I am signing this object:

@pascalw
pascalw / mix-test-wrapper.rb
Created Jan 18, 2019
VSCode Elixir umbrella app tests
View mix-test-wrapper.rb
#!/usr/bin/env ruby
test_file = ARGV[0]
line_no_arg = ARGV[1]
parts = test_file.scan(/.*apps\/(.*?)\/(.*)/).last
app = parts[0]
test_file_relative = parts[1]
line_no = line_no_arg ? ":#{line_no_arg}" : ""
@pascalw
pascalw / inline-css.rb
Last active Jan 17, 2018
Script to scan a directory for HTML files, inlining stylesheets into <head>. Useful for Middleman sites.
View inline-css.rb
require "pathname"
require "nokogiri"
def inline_css(html_file, root)
doc = File.open(html_file) { |f| Nokogiri::HTML(f) }
stylesheet_tags = doc.css("link[rel=stylesheet]")
puts "Inlining css in #{html_file}" if stylesheet_tags.any?
stylesheet_tags.each do |stylesheet_tag|
@pascalw
pascalw / Dockerfile
Created Jan 22, 2016
Dockerfile for Maji Android projects
View Dockerfile
FROM ruby:2.1.2
RUN apt-get update && apt-get -y install apt-utils \
build-essential \
git-core \
curl libssl-dev \
libreadline-dev \
zlib1g zlib1g-dev \
libmysqlclient-dev \
libcurl4-openssl-dev \
@pascalw
pascalw / Dockerfile
Created Dec 16, 2014
Docker Ruby image based on Debian Wheezy
View Dockerfile
FROM buildpack-deps:wheezy
RUN apt-get update && apt-get install -y curl procps && rm -rf /var/lib/apt/lists/*
ENV RUBY_MAJOR 2.1
ENV RUBY_VERSION 2.1.3
# some of ruby's build scripts are written in ruby
# we purge this later to make sure our final image uses what we just built
RUN apt-get update \
You can’t perform that action at this time.