Skip to content

Instantly share code, notes, and snippets.

@syabro
syabro / xvfb_daemon.sh
Created September 26, 2012 12:58 — forked from fedesilva/xvfb_daemon.sh
Xvfb startup init script for headless selenium started via Jenkins
#!/bin/bash
# /etc/init.d/xvfb_daemon
# Xvfb startup script.
# Tom Meier <[email protected]>
#
### BEGIN INIT INFO
# Provides: xvfb
# Short-Description: Start/stop/restart daemon
# Description: Controls the Xvfb daemon which starts/stops the X Virtual Framebuffer server
### END INIT INFO
(function (App) {
App.Pages.StorePage = Backbone.View.extend({
name: 'store',
container: '#page_container',
template: '#market_page_template',
initialize: function () {
},
$(function (App) {
App.Views.CategoryListView = Backbone.View.extend({
tagName: 'ul',
collection: new App.Collections.CategoryCollection(),
events: {
'click .staff_pick': "showStaffPick"
},
import re
import sys
line1, line2 = open(sys.argv[1]).read().split(';')
def int2bin(n, count=24):
"""returns the binary of integer n, using count number of digits"""
return "".join([str((n >> y) & 1) for y in range(count-1, -1, -1)])