Skip to content

Instantly share code, notes, and snippets.

View pierot's full-sized avatar
🏠
Working from home

Pieter Michels pierot

🏠
Working from home
View GitHub Profile
@pierot
pierot / gist:4999917
Created February 20, 2013 21:46
read_ir.pde
/* Raw IR decoder sketch!
This sketch/program uses the Arduno and a PNA4602 to
decode IR received. This can be used to make a IR receiver
(by looking for a particular code)
or transmitter (by pulsing an IR LED at ~38KHz for the
durations detected
Code is public domain, check out www.ladyada.net and adafruit.com
for more tutorials!
*/
DEVELOPMENT:
<script data-main='/assets/js/build' src="/assets/js/vendor/require.js"></script>
PRODUCTION
<script data-main='/assets/js/main.min' src="/assets/js/vendor/require.js"></script>
grunt.loadNpmTasks('grunt-contrib-requirejs');
requirejs: {
compile: {
options: {
mainConfigFile: 'assets/js/build.js',
baseUrl: "assets/js",
name: "main",
include: ['build'],
out: 'assets/js/main.min.js'
}
}
@pierot
pierot / main.coffee
Last active December 12, 2015 06:29
define ['backbone', 'jquery', 'router'], (Backbone, $, AppRouter) ->
new AppRouter
require.config {
deps: ['main']
baseUrl: "/assets/js"
paths:
jquery: 'vendor/jquery'
lodash: 'vendor/lodash'
backbone: 'vendor/backbone'
handlebars: 'vendor/handlebars'
shim:
handlebars:
@pierot
pierot / gist:4729314
Created February 7, 2013 07:50
backbone, requirejs, tree structure
assets
├── coffee
│   ├── build.coffee
│   ├── config.coffee
│   ├── helpers
│   │   └── template-loader.coffee
│   ├── main.coffee
│   ├── models
│   │   └── base.coffee
│   ├── router.coffee
@pierot
pierot / Test
Created January 10, 2013 10:30
.class
font-size: 12
color: #ff0000
1.9.3-p194 ⚡ root ⚡ ~ ⚡ cat /etc/network/interfaces
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
# The loopback network interface
auto lo
iface lo inet loopback
# The primary network interface
auto eth0
1.9.3-p194 ⚡ root ⚡ ~ ⚡ route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
0.0.0.0 xxx.xxx.xxx.1 0.0.0.0 UG 0 0 0 eth0
xxx.xxx.xxx.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0