Skip to content

Instantly share code, notes, and snippets.

View sboisson's full-sized avatar

Stéphane sboisson

View GitHub Profile
@harunyardimci
harunyardimci / pre-receive
Last active December 10, 2015 22:18
pre-recevie git hook to check if the user has allowed to commit master branch.
#!/bin/bash
SOURCE="${BASH_SOURCE[0]}"
DIR="$( dirname "$SOURCE" )"
FILE_PATH="$(pwd)/$DIR"
# full path of the allowed commiters file.
COMMITERS_FILE="$FILE_PATH/commiters.txt"
function isFileExits() {
import time
import socket
import base64
src = '192.168.1.2' # ip of remote
mac = '00-AB-11-11-11-11' # mac of remote
remote = 'python remote' # remote name
dst = '192.168.1.3' # ip of tv
app = 'python' # iphone..iapp.samsung
@ktym
ktym / unwebarchive.rb
Created February 12, 2013 18:03
Extract contents of a .webarchive file.
#!/usr/bin/env ruby
#
# Mac OS X webarchive is a binary format of a plist file. You can extract the contents manually:
# 1. convert the plist file into XML by "plutil -convert xml1 file.webarchive"
# 2. parse the resulted XML file by some XML parser
# 3. decode "WebResourceData" by Base64.decode64(data) in each key
# 4. save the decoded content into a file indicated by "WebResourceData"
# Thankfully, the plist library can take care of annoying steps 2 and 3.
#
# Preparation:
@rkirsling
rkirsling / LICENSE
Last active December 16, 2025 15:47
Directed Graph Editor
Copyright (c) 2013 Ross Kirsling
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
@fieldOfView
fieldOfView / EquirectangularViewer.pbk
Last active November 4, 2017 16:43
Equirectangular viewer Pixel Bender filter
/**
* Equirectangular viewer
* Last update: 6 March 2013
*
* Changelog:
* 1.0 - Initial release
*
* Licensed under the MIT License:
* http://www.opensource.org/licenses/mit-license.php
*
@fieldOfView
fieldOfView / WebGL360Video.html
Created March 7, 2013 07:57
Simple WebGL/GLSL video panorama viewer
<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>Simple WebGL/GLSL video panorama viewer</title>
<style>
body {
background-color: #000000;
@nimbus154
nimbus154 / dictionary.py
Created April 21, 2013 23:54
An example of how to write functional tests for a RESTful API using the Bottle microframework.
from bottle import get, run, request, post, Bottle, abort, error, response, debug, redirect
# This is a dictionary endpoint. It retrieves definitions for words.
# You can also add words to the dictionary.
# this allows our bottle application to be accessible outside this file
app = Bottle()
dictionary = {
"lugubrious": "extremely sad",
@kracekumar
kracekumar / brubeck_demo.py
Last active December 16, 2015 23:09
Hello world bench mark between brubeck.io and diesel.io
#!/usr/bin/env python
from brubeck.request_handling import Brubeck, WebMessageHandler
from brubeck.connections import Mongrel2Connection
import sys
class DemoHandler(WebMessageHandler):
def get(self):
name = self.get_argument('name', 'dude')
self.set_body('Take five, %s!' % name)
@tknerr
tknerr / Vagrantfile
Last active July 2, 2024 19:33
Sample Vagrantfile that works with all providers (virtualbox, aws, managed) and in combination with the vagrant-omnibus plugin
#
# Vagrantfile for testing
#
Vagrant::configure("2") do |config|
# the Chef version to use
config.omnibus.chef_version = "11.4.4"
def configure_vbox_provider(config, name, ip, memory = 384)
config.vm.provider :virtualbox do |vbox, override|
@jasonthomas
jasonthomas / circusd.sh
Created June 14, 2013 22:16
circusd init script
#!/bin/bash
#
# circusd This scripts turns circusd on
#
# Author: Jason Thomas <jthomas@mozilla.com>
#
# chkconfig: - 95 04
#
# description: circus is a program that will let you run and watch
# multiple processes and sockets.