This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#extension GL_OES_standard_derivatives : enable | |
precision highp float; | |
precision highp int; | |
varying vec3 vViewPos; | |
vec3 normals_1_0(vec3 pos) { | |
vec3 fdx = dFdx(pos); | |
vec3 fdy = dFdy(pos); | |
return normalize(cross(fdx, fdy)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[alias] | |
history = log --pretty=format:'%C(cyan)%h%Cred%d %Creset%s%Cgreen [%cn] %C(blue)(%cr)' --decorate |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# find node | |
NODE=$(which node) | |
# get the latest commit | |
COMMIT=$(git rev-parse HEAD) | |
# if it cannot find a node installation | |
if [[ -z $NODE ]]; then |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# make sure the behaviour works | |
haxe test.hxml | |
exit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ./hooks/minify.js | |
var UglifyJS = require("uglify-js"); // run "npm install uglify-js" in the hooks directory first! | |
var fs = require('fs'); | |
exports.hook = function(flow, done) { | |
var basePath = flow.project.project.app.output + '/web/' + flow.project.project.app.name; | |
var result = UglifyJS.minify(basePath + '.js', { | |
mangle: true // set to false if you run into issues | |
}); | |
fs.writeFile(basePath + '.min.js', result.code, function(err) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function [ result ] = qaxisangle( axis, ang ) | |
%QAXISANGLE Generates a quaternion which rotates by ang around axis | |
% some helpers | |
c = cos(ang / 2); | |
s = sin(ang / 2); | |
axis = axis ./ norm(axis); | |
result = [ | |
c, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class PID | |
{ | |
public double KP { get; set; } | |
public double KI { get; set; } | |
public double KD { get; set; } | |
public double SetPoint { get; set; } | |
public double MinSet { get; set; } | |
public double MaxSet { get; set; } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
haxelib git flow https://github.com/underscorediscovery/flow.git | |
haxelib git snow https://github.com/underscorediscovery/snow.git | |
haxelib git luxe https://github.com/underscorediscovery/luxe.git | |
haxelib git mint https://github.com/underscorediscovery/mint.git | |
wget http://build.luxeengine.com/snow/latest.all.zip |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function [ varargout ] = trimzeros( varargin ) | |
%TRIMZEROS Removes trailing "zero" datapoints from the input vectors | |
% At the end of the `emg` array are expected to be a series of 0.0 values which | |
% cause problems for data analysis. This function will remove those zeros from the | |
% input columns. Call this function using either: | |
% >> [ t, emg ] = trimzeros(t, emg); | |
% or: | |
% >> [ t, emg, force ] = trimzeros(t, emg, force); | |
if (nargin < 2) || (nargin > 3) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[alias] | |
ls = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit -- | |
plog = log --graph --pretty='format:%C(red)%d%C(reset) %C(yellow)%h%C(reset) %ar %C(green)%aN%C(reset) %s' | |
lg = log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit | |
tlog = log --stat --since='1 Day Ago' --graph --pretty=oneline --abbrev-commit --date=relative | |
fuck = reset HEAD --hard | |
yolo = push -f | |
news = log -p @{1}.. | |
d = diff -c HEAD | |
cleanup = !git clean -i -x -d -e "TAGS" -e 'tags' ; git fetch -p |