- Bluenoise in the game INSIDE (dithering, raymarching, reflections)
- Dithering, Ray marching, shadows etc
- A Survery of Blue Noise and Its Applications
- Moments In Graphics (void-and-cluster)
- Bart Wronski Implementation of Solid Angle algorithm
function flatten(path,num){ | |
var l = path.getTotalLength() | |
var p = path.getPointAtLength(0) | |
var d = `M${p.x} ${p.y}` | |
for(var i = (l/num);i<=l;i+=(l/num)){ | |
p = path.getPointAtLength(i) | |
d+=`L${p.x} ${p.y}` | |
} | |
path.setAttribute("d",d+"z") | |
} |
# Modified for OpenBSD | |
# Assumes being root | |
# Requires curl to be installed, wget can also be used, relevant commands need to be adjusted. acme.sh supports both. | |
# Configured to use Cloudflare DNS for verification | |
# How to use "acme.sh" to set up Lets Encrypt without root permissions | |
# See https://github.com/Neilpang/acme.sh for more | |
# This assumes that your website has a webroot at "/var/www/<domain>" | |
# I'll use the domain "EXAMPLE.com" as an example |
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
import React, { Component } from 'react'; | |
class Test extends Component { | |
render() { | |
return ( | |
<div> | |
Wowowow ' this is fun | |
</div> | |
); | |
} |
git shortlog -s | cut -f2 | while read a; do git log --author="$a" --pretty=tformat: --numstat | awk '{ add += $1 ; subs += $2 ; loc += $1 - $2 } END { print "'"$a"',"add","subs","loc }'; done | awk '{ print; split($0,a,","); total += a[2] } END { print "Total,"total",0,"total }' | sort -nrk2 -t',' | while read l; do a=`echo $l | cut -d',' -f1`; if [ "$a" == "Total" ]; then t=`echo $l | cut -d',' -f2`; fi; mt=`echo $l | cut -d',' -f2`; echo $l","`awk 'BEGIN { printf("%d", '$mt'/'$t'*100) }'`; done | tail -n +2 |
#!/usr/bin/python | |
from collections import OrderedDict | |
conventional_alphabet = list('abcdefghijklmnopqrstuvwxyz') | |
conventional_phonetic = ['a', 'bee', 'cee', 'dee', 'e', 'ef', 'gee', 'aitch', | |
'i', 'jay', 'kay', 'el', 'em', 'en', 'o', 'pee', | |
'cue', 'ar', 'es', 'tee', 'u', 'vee', 'doubleu', 'ex', | |
'wye', 'zed'] | |
def lexi(letters): |
When the directory structure of your Node.js application (not library!) has some depth, you end up with a lot of annoying relative paths in your require calls like:
const Article = require('../../../../app/models/article');
Those suck for maintenance and they're ugly.
class XAccelMiddleware(object): | |
"""A WSGI Middleware that converts X-Sendfile headers to X-Accel-Redirect | |
headers if possible. | |
If the path is not mapped to a URI usable for X-Sendfile we abort with an | |
error since it likely means there is a misconfiguration. | |
""" | |
def __init__(self, app, mapping): | |
self.app = app |
Locate the section for your github remote in the .git/config
file. It looks like this:
[remote "origin"]
fetch = +refs/heads/*:refs/remotes/origin/*
url = [email protected]:joyent/node.git
Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/*
to this section. Obviously, change the github url to match your project's URL. It ends up looking like this: