Skip to content

Instantly share code, notes, and snippets.

View guidoschmidt's full-sized avatar

Guido Schmidt guidoschmidt

View GitHub Profile
@Olical
Olical / round.js
Created August 22, 2011 14:05
Very fast rounding in JavaScript
Number.round = function() {
return (this + 0.5) << 0;
};
@davidnunez
davidnunez / gist:1404789
Created November 29, 2011 13:20
list all installed packages in android adb shell
pm list packages -f
@ScottPhillips
ScottPhillips / .htaccess
Created February 2, 2012 04:30
Common .htaccess Redirects
#301 Redirects for .htaccess
#Redirect a single page:
Redirect 301 /pagename.php http://www.domain.com/pagename.html
#Redirect an entire site:
Redirect 301 / http://www.domain.com/
#Redirect an entire site to a sub folder
Redirect 301 / http://www.domain.com/subfolder/
@bhaskara
bhaskara / openni_record_player.launch
Created April 16, 2012 17:38
Example ROS launch file that uses depth_image_proc to convert an RGB-depth image pair into a point cloud
<launch>
<!--
To distinguish between the cases where the rgb image is
1280x1024 versus 640x480. This affects the pipeline.
-->
<arg name="high_res_rgb" default="true"/>
<arg name="cloud_input_ns" value="camera/rgb_downsampled"
if="$(arg high_res_rgb)"/>
<arg name="cloud_input_ns" value="camera/rgb" unless="$(arg high_res_rgb)"/>
@zziuni
zziuni / stuns
Created September 18, 2012 08:05
STUN server list
# source : http://code.google.com/p/natvpn/source/browse/trunk/stun_server_list
# A list of available STUN server.
stun.l.google.com:19302
stun1.l.google.com:19302
stun2.l.google.com:19302
stun3.l.google.com:19302
stun4.l.google.com:19302
stun01.sipphone.com
stun.ekiga.net
@patriciogonzalezvivo
patriciogonzalezvivo / MakingGeometries.md
Last active January 7, 2022 16:58
Creating Geometries in openFrameworks

Face by Face

void addFace(ofMesh& mesh, ofVec3f a, ofVec3f b, ofVec3f c) {
	ofVec3f normal = ((b - a).cross(c - a)).normalize();
	mesh.addNormal(normal);
	mesh.addVertex(a);
	mesh.addNormal(normal);
	mesh.addVertex(b);
	mesh.addNormal(normal);
@ejfox
ejfox / _.md
Created June 30, 2013 02:56
timbre.js
@TomByrne
TomByrne / MultiExporter.jsx
Last active March 19, 2024 10:12
An Illustrator script for exporting layers and/or artboards into separate files (PNG8 / PNG24 / EPS / PDF / SVG / JPG / FXG).See http://www.tbyrne.org/export-illustrator-layers-to-svg-files
// MultiExporter.jsx
// Version 0.1
// Version 0.2 Adds PNG and EPS exports
// Version 0.3 Adds support for exporting at different resolutions
// Version 0.4 Adds support for SVG, changed EPS behaviour to minimise output filesize
// Version 0.5 Fixed cropping issues
// Version 0.6 Added inner padding mode to prevent circular bounds clipping
//
// Copyright 2013 Tom Byrne
// Comments or suggestions to tom@tbyrne.org
@patriciogonzalezvivo
patriciogonzalezvivo / GLSL-Noise.md
Last active May 3, 2024 08:26
GLSL Noise Algorithms

Please consider using http://lygia.xyz instead of copy/pasting this functions. It expand suport for voronoi, voronoise, fbm, noise, worley, noise, derivatives and much more, through simple file dependencies. Take a look to https://github.com/patriciogonzalezvivo/lygia/tree/main/generative

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);
@redguardtoo
redguardtoo / .ctags.sample
Last active March 21, 2024 16:55
my ~/.ctags. Please note this is configuration for Exuberant Ctags. If you use Universal Ctags, you need run `ctags --options="$HOME/.ctags" -e -R` in shell at least once and fix all the warnings.
--c++-kinds=+p
--fields=+iaS
--extra=+q
--exclude=*/.hg/*
--exclude=.hg/*
--exclude=*/.cvs/*
--exclude=.cvs/*
--exclude=*/.svn/*
--exclude=.svn/*
--exclude=*/.git/*