Skip to content

Instantly share code, notes, and snippets.

hugohil hugohil

Block or report user

Report or block hugohil

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
gabrielstuff /
Last active Nov 15, 2018
The top software install for a new PC on Windows

New windows 10 machine setup

first install bash:

Third, install choco, open in elevation mode the cmd (with administrative rights) and copy paste :

@"%SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe" -NoProfile -InputFormat None -ExecutionPolicy Bypass -Command "iex ((New-Object System.Net.WebClient).DownloadString(''))" && SET "PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin"
cvan / webgl-detect-gpu.js
Last active May 31, 2020
use JavaScript to detect GPU used from within your browser
View webgl-detect-gpu.js
var canvas = document.createElement('canvas');
var gl;
var debugInfo;
var vendor;
var renderer;
try {
gl = canvas.getContext('webgl') || canvas.getContext('experimental-webgl');
} catch (e) {

Generic 1,2,3 Noise

float rand(float n){return fract(sin(n) * 43758.5453123);}

float noise(float p){
	float fl = floor(p);
  float fc = fract(p);
	return mix(rand(fl), rand(fl + 1.0), fc);
staltz /
Last active Jun 1, 2020
The introduction to Reactive Programming you've been missing
katychuang /
Last active May 8, 2020
remove mongodb that was installed via brew
#!/usr/bin/env sh
# checks to see if running
launchctl list | grep mongo
launchctl unload ~/Library/LaunchAgents/homebrew.mxcl.mongodb.plist
launchctl remove homebrew.mxcl.mongodb
pkill -f mongod
Anywhere: Meteor.isClient
Anywhere: Meteor.isServer
Anywhere: Meteor.startup(func)
Anywhere: Meteor.absoluteUrl([path], [options])
Anywhere: Meteor.settings
Anywhere: Meteor.release
DamonOehlman /
Last active Apr 18, 2020
General WebRTC tips and tricks collated over time
neilmendoza / gist:4512992
Last active Apr 23, 2020
Function to return matrix for rotation about an arbitrary axis in GLSL.
View gist:4512992
mat4 rotationMatrix(vec3 axis, float angle)
axis = normalize(axis);
float s = sin(angle);
float c = cos(angle);
float oc = 1.0 - c;
return mat4(oc * axis.x * axis.x + c, oc * axis.x * axis.y - axis.z * s, oc * axis.z * axis.x + axis.y * s, 0.0,
oc * axis.x * axis.y + axis.z * s, oc * axis.y * axis.y + c, oc * axis.y * axis.z - axis.x * s, 0.0,
oc * axis.z * axis.x - axis.y * s, oc * axis.y * axis.z + axis.x * s, oc * axis.z * axis.z + c, 0.0,
Mithrandir0x / gist:3639232
Created Sep 5, 2012
Difference between Service, Factory and Provider in AngularJS
View gist:3639232
// Source:!topic/angular/hVrkvaHGOfc
// jsFiddle:
// author: Pawel Kozlowski
var myApp = angular.module('myApp', []);
//service style, probably the simplest one
myApp.service('helloWorldFromService', function() {
this.sayHello = function() {
return "Hello, World!"

From Meteor's documentation:

In Meteor, your server code runs in a single thread per request, not in the asynchronous callback style typical of Node. We find the linear execution model a better fit for the typical server code in a Meteor application.

This guide serves as a mini-tour of tools, trix and patterns that can be used to run async code in Meteor.

Basic async

Sometimes we need to run async code in Meteor.methods. For this we create a Future to block until the async code has finished. This pattern can be seen all over Meteor's own codebase:

You can’t perform that action at this time.