Skip to content

Instantly share code, notes, and snippets.

View pmeinhardt's full-sized avatar
🚲

Paul Meinhardt pmeinhardt

🚲
View GitHub Profile
@pmeinhardt
pmeinhardt / compress-js.rb
Created January 15, 2013 23:56
ruby wrapper script for google closure compiler
#!/usr/bin/env ruby
begin
require 'closure-compiler'
rescue LoadError => e
puts e.message
puts "to fix: gem install 'closure-compiler'"
exit 1
end
@pmeinhardt
pmeinhardt / capybara-cheatsheet.md
Last active December 14, 2015 16:29 — forked from zhengjia/capybara cheat sheet
overview of the capybara dsl

Capybara Cheat Sheet

View the original gist: https://gist.github.com/428105

Navigating

visit "/projects"
visit post_comments_path(post)

Clicking Links and Buttons

@pmeinhardt
pmeinhardt / session.rb
Last active April 15, 2017 18:18
sign users in/out in cucumber scenarios, without filling in a sign-in form each time (using warden, works with devise)
# features/support/session.rb
# Sign-in users directly, without going through the sign-in form each time.
#
# Including the Warden::Test::Helpers in the cucumber world, allows us
# to call login_as(user, opts = {}) and logout(*scopes) in cucumber steps.
#
# http://git.io/h1NRxQ
Before do |scenario|
@pmeinhardt
pmeinhardt / styleguides.md
Last active December 21, 2015 06:18
styleguide resources
@pmeinhardt
pmeinhardt / download-site.md
Created October 10, 2013 17:12
download an entire page (including css, js, images) for offline-reading, archiving… using wget

If you ever need to download an entire website, perhaps for off-line viewing, wget can do the job — for example:

$ wget --recursive --no-clobber --page-requisites --html-extension --convert-links --restrict-file-names=windows --domains website.org --no-parent  www.website.org/tutorials/html/

This command downloads the website www.website.org/tutorials/html/.

The options are:

  • --recursive: download the entire website
  • --domains website.org: don't follow links outside website.org
@pmeinhardt
pmeinhardt / notes.md
Last active November 5, 2015 21:03
Om, React and ClojureScript
@pmeinhardt
pmeinhardt / index.html
Last active August 29, 2015 14:01
mediarecorder-demo (no file:/// urls, use a file server, works in firefox nightly - 24/05/2014)
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Media Stream Recording</title>
</head>
<body>
<video id="playback" controls autoplay></video>
<button onclick="stopRecording()">stop</button>
<a id="download-link" href="#" download="recording.webm">Download</a>
@pmeinhardt
pmeinhardt / README.md
Last active June 23, 2017 11:56
Troubleshooting Travis-CI builds locally

Docker setup and running a (language-specific) Travis-CI docker image:

# install docker tools (e.g. via homebrew)
brew install docker docker-machine

# create a docker machine (https://docs.docker.com/machine/)
docker-machine create --driver virtualbox default

# set up your shell session for docker
@pmeinhardt
pmeinhardt / raspberry-pi-setup.sh
Last active July 9, 2016 09:31
Raspberry Pi Setup (using Raspbian Jessie Lite)
# RASPBIAN JESSIE LITE
#
# Version: May 2016
# Release date: 2016-05-27
# Kernel version: 4.4
#
# https://www.raspberrypi.org/downloads/raspbian/
# boot and login (default username: pi, password: raspberry)
@pmeinhardt
pmeinhardt / config.txt
Last active July 9, 2016 10:52
HiFiBerry Setup (Raspbian Jessie Lite, Kernel 4.4)
# For more options and information see
# http://www.raspberrypi.org/documentation/configuration/config-txt.md
# Some settings may impact device functionality. See link above for details
# uncomment if you get no picture on HDMI for a default "safe" mode
#hdmi_safe=1
# uncomment this if your display has a black border of unused pixels visible
# and your display can output without overscan
#disable_overscan=1