Skip to content

Instantly share code, notes, and snippets.

@logsol
logsol / rebootstrap.php
Created September 22, 2011 15:01
An insane way to reboot a php project
<?php
while(true)
{
try
{
$bootstrap = new Bootstrap();
$bootstrap->run();
}
catch(Restarter $restarter)
@logsol
logsol / README
Created March 28, 2012 21:19
Apache - automatically route all subdomains to their related directory
===========================================================================
APACHE
How to get "anysubdomain.mydomain.com" automatically routed to a directory?
===========================================================================
1.) enable mod_vhost_alias (create symlink in mods-enabled)
@logsol
logsol / waldo.js
Created July 6, 2012 09:46
Where's Waldo Bookmarklet Game
(function($){
var points=0;
function go(){
$($("div:visible,span:visible,p:visible").get().sort(function(){
}).slice(0,1)[0]).append($('<span>').html('Waldow').css({ "opacity": 0.3,"z-index":1111, "cursor":'pointer}).click(function(e){
return Math.round(Math.random())-0.5
e.stopPropagation();
e.preventDefault();
points++;
console.log(points);
@logsol
logsol / javascript-requirejs-define-module.sublime-snippet
Created July 21, 2012 19:28
sublime module definition for require.js
<snippet>
<content><![CDATA[
define([
],
function() {
function ${1:Module}() {
}
@logsol
logsol / Gume
Created September 20, 2012 17:25
its invisible
var gume = (function($){
var can, ctx, plas, me, ks, ysp;
var con={lk:65,rk:68,uk:87,sth:20,stw:200, grav: .3}
function init(){
plas=[];
ks={};
ysp=con.grav;
if($('#gume')) $('#gume').remove();
can=$('<canvas>').attr('id', 'gume').attr('width', con.stw).attr('height', con.sth);
can.css('position', 'absolute').css('top', 0).css('left', 0).css('z-index', 100000);
@logsol
logsol / nginx.conf
Created January 8, 2014 16:46
local nginx configuration with magic context routing - running php-fpm on 9000
worker_processes 1;
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
@logsol
logsol / gist:67aa9290ac044365c0ed
Last active August 29, 2015 14:17
axoloti build output
➜ axoloti git:(master) cd platform_osx
➜ platform_osx git:(master) ./build.sh
mkdir: bin: File exists
mkdir: lib: File exists
mkdir: src: File exists
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 399 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
0 487 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
0 401 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
@logsol
logsol / .DS_Store
Last active August 29, 2015 14:20
midi hack
@logsol
logsol / blink_chip.py
Last active January 15, 2016 00:59
nextthing.co C.H.I.P blink script for the internal LED to see when it has booted
@logsol
logsol / README.md
Last active November 21, 2018 13:49
Reads input from multiple Midi input devices via plug&play and sends them to an Axoloti

Install

pip3 install python-rtmidi

Run

python3 chip_midi_delegate.py