Skip to content

Instantly share code, notes, and snippets.

@tsterker
tsterker / mermaid-gannt.css
Created September 16, 2020 12:02
mermaid-gannt.css
.grid .tick {
stroke: lightgrey;
opacity: 0.3;
shape-rendering: crispEdges;
}
.grid path {
stroke-width: 0;
}
#tag {
@tsterker
tsterker / cVimrc
Last active February 12, 2021 14:16
let blacklists = ["https://gitlab.gleif.org/*","https://grafana.dg-stg.gleif.org/*","https://www.youtube.com/*"]
site 'https://*.youtube.com/*' {
unmap < >
}
map gP :duplicate<CR>
set showtabindices
var toGet=['media_id', 'author_name'];var json=document.getElementById('json').innerText.split('\n');for(var i=0,len=json.length;i<len;i++){var match=new RegExp('(.*): (.*),?').exec(json[i]);if(match && toGet.indexOf(match[1])>-1){var dump=prompt(match[1],match[2].replace(/&#34;/g,'').replace(/,$/, ''));}}
window.location = 'http://api.instagram.com/oembed?url='+window.location.href;
N = 0;
E = 1;
S = 2;
W = 3;
% for example a 4x4 grid:
policy = [S W W W;
S W W N;
S N E E;
E N W W];
javascript: var episode = window.location.href.match(/[0-9]{2}/g)[1]; var next = +episode + 1; next = (next+'').length === 1 ? '0'+next : next; window.location.href = window.location.href.replace('e'+episode, 'e'+next);
// using first frame for testing
Skeleton* frame0 = rest_animation->GetFrame(0);
// for each joint in skeleton...
for (int i = 0; i < frame0->NumJoints(); i++) {
// current joint
Joint jnt = frame0->GetJoint(i);
// "global" transformation that should be applied to current joint
Matrix_4x4 totalTransform = Matrix_4x4::Id();
var episode = window.location.href.match(/[0-9]{2}/g)[1];
var next = +episode + 1;
next = (next+'').length === 1 ? '0'+next : next;
window.location.href = window.location.href.replace('e'+episode, 'e'+next);
void drawFaceNormals()
{
glColor3f(0,0,1); // The colour we will be drawing is white (red = 1, green = 1, blue = 1).
vector<vec3> verts = trig.Vertices();
vector<vec3> fnorms = trig.FaceNormals();
vec3 fnorm, pos, from, to;
glBegin(GL_LINES);
for(int i = 0; i < fnorms.size(); i++){
# helpers
function branchExists(){ git show-ref --verify --quiet refs/heads/"$1"; }
function currentBranch(){ git rev-parse --abbrev-ref HEAD; }
function isCurrentBranch() { [ "$(currentBranch)" == "$1" ]; }
# colors
Color_Off='\e[0m' # Text Reset
BWhite='\e[1;37m' # White
Red='\e[0;31m' # Red
function whitePrompt(){ echo -en "${BWhite}$@${Color_Off}"; read value; }