Skip to content

Instantly share code, notes, and snippets.

View bastjan's full-sized avatar

Sebastian Widmer bastjan

View GitHub Profile
@bastjan
bastjan / postgres.app-pg_tools
Created April 20, 2013 09:33
use correct pg tools with Postgres.app, mac has its own (older) tools. Use it in .profile or .rvmrc or ...
# use correct pg tools with Postgres.app, mac has its own
PATH="/Applications/Postgres.app/Contents/MacOS/bin:$PATH"
@bastjan
bastjan / overlay_css_before_selector.html
Last active December 26, 2015 19:39
overlay with html5 css :before selector
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>:before Test</title>
<style type="text/css">
.block {
width: 150px;
height: 150px;
@bastjan
bastjan / jquery_ready_coffescript_regex
Created November 5, 2013 13:20
jquery ready coffescript regex
(jQuery|\$)\(?.{0,2}(=|-)>
@bastjan
bastjan / jdheadless.md
Created November 17, 2013 15:05 — forked from thde/jdheadless.md

JDownloader headless Installation

für Ubuntu 10.04

codezero.ch schliesst aus Gründen der Kapazität und der motivation seine Pforten =). Die vielbesuchten Artikel sollen jedoch erhalten bleiben. Darum diese Gists.

Der JDownloader ist ja eigentlich nicht für die Konsole gemacht… Er lässt sich jedoch auch gut in der Konsole betreiben:

Installation des JDownloader

@bastjan
bastjan / docker_firefox-vnc
Last active December 28, 2015 18:39
firefox inside docker container
# FROM: http://stackoverflow.com/a/16311264/2473863
# Firefox over VNC for docker
#
# VERSION 0.1
# DOCKER-VERSION 0.2
from ubuntu:12.04
# make sure the package repository is up to date
run echo "deb http://archive.ubuntu.com/ubuntu precise main universe" > /etc/apt/sources.list
run apt-get update
@bastjan
bastjan / find_spine_bind
Last active December 29, 2015 17:39
find evil Spine.bind and replace with listenTo
Spine\.bind.(['"].+?)\)?$
@listenTo Spine, $1
#[0-9a-f]{3,6}
@bastjan
bastjan / spine_extend_include_test.coffee
Created December 11, 2013 11:50
spineextend include test
moduleKeywords = ['included', 'extended']
class Spine
class Spine.Module
@include: (obj) ->
throw new Error('include(obj) requires obj') unless obj
for key, value of obj when key not in moduleKeywords
@::[key] = value
obj.included?.apply(this)
this
bin/cucumber --require features/ features/example-script.feature
@bastjan
bastjan / random_string.js
Created January 28, 2014 10:20
random string in javascript
(Math.random() + 1).toString(36).substring(7)