Get Homebrew installed on your mac if you don't already have it
Install highlight. "brew install highlight". (This brings down Lua and Boost as well)
// Ported from Stefan Gustavson's java implementation | |
// http://staffwww.itn.liu.se/~stegu/simplexnoise/simplexnoise.pdf | |
// Read Stefan's excellent paper for details on how this code works. | |
// | |
// Sean McCullough [email protected] | |
/** | |
* You can pass in a random number generator object if you like. | |
* It is assumed to have a random() method. | |
*/ |
#!/usr/bin/env sh | |
# Under WTPL 2 | |
# https://github.com/AdamN/python-webkit2png | |
COMMITS=$(git log --format="%H" --reverse) | |
OUTPUT_DIR="/tmp" | |
i=0 | |
for commit in ${COMMITS} | |
do |
Get Homebrew installed on your mac if you don't already have it
Install highlight. "brew install highlight". (This brings down Lua and Boost as well)
/* | |
* This work is free. You can redistribute it and/or modify it under the | |
* terms of the Do What The Fuck You Want To Public License, Version 2, | |
* as published by Sam Hocevar. See the COPYING file for more details. | |
*/ | |
/* | |
* Easing Functions - inspired from http://gizma.com/easing/ | |
* only considering the t value for the range [0, 1] => [0, 1] | |
*/ | |
EasingFunctions = { |
#!/usr/bin/env ruby -w | |
# pnginator.rb: pack a .js file into a PNG image with an HTML payload; | |
# when saved with an .html extension and opened in a browser, the HTML extracts and executes | |
# the javascript. | |
# Usage: ruby pnginator.rb input.js output.png.html | |
# By Gasman <http://matt.west.co.tt/> | |
# from an original idea by Daeken: http://daeken.com/superpacking-js-demos |
# From http://garmoncheg.blogspot.com/2012/06/pretty-git-log.html | |
git config --global alias.lg "log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --" |
# v1.0 of a command line uploader for the koken gallery software. | |
# The only non-standard requirement is pyton-requests. | |
import json | |
import requests | |
import os | |
from urllib import quote as quote | |
api_url = "http://yourdomain/api.php?" | |
common_headers = {'X-Koken-Auth':'cookie'} |
import React from 'react'; | |
import component from 'omniscient'; | |
import immstruct from 'immstruct'; | |
import { compose, valueNode, partialProps } from './compose'; | |
const data = immstruct({ counter: 0, title: 'My title' }); | |
const em = component(({partialedTitle, children}) => | |
<em>{partialedTitle}: {children}</em>); |
import fs from 'fs'; | |
import path from 'path'; | |
const convert = (imgPath) => { | |
// read image file | |
fs.readFile(imgPath, (err, data)=>{ | |
// error handle | |
if(err) { | |
throw err; | |
} |
More details - http://blog.gbaman.info/?p=791
For this method, alongside your Pi Zero, MicroUSB cable and MicroSD card, only an additional computer is required, which can be running Windows (with Bonjour, iTunes or Quicktime installed), Mac OS or Linux (with Avahi Daemon installed, for example Ubuntu has it built in).
1. Flash Raspbian Jessie full or Raspbian Jessie Lite onto the SD card.
2. Once Raspbian is flashed, open up the boot partition (in Windows Explorer, Finder etc) and add to the bottom of the config.txt
file dtoverlay=dwc2
on a new line, then save the file.
3. If using a recent release of Jessie (Dec 2016 onwards), then create a new file simply called ssh
in the SD card as well. By default SSH i