Skip to content

Instantly share code, notes, and snippets.

View calderonsteven's full-sized avatar

Steven Calderon calderonsteven

View GitHub Profile
@samusgray
samusgray / gist:1c71323c782664efda78
Last active June 7, 2016 22:15
reveal.js subliminal messages
var images = [
'<img src="img/starbucks.png">',
'<img src="img/google.png">'
];
var flash = function(id, image) {
var target = document.getElementById(id);
var goodHTML = target.innerHTML;
target.innerHTML = image;
@ampedandwired
ampedandwired / README.md
Last active October 6, 2022 06:40
webpack-dev-server with html-webpack-plugin
$ npm install
$ ./node_modules/.bin/webpack-dev-server
$ open http://localhost:8080/webpack-dev-server/

Notes:

  • Note the trailing slash on the URL is significant. Without it webpack-dev-server shows a file listing page.
  • You need 1.0.11 or later of webpack-dev-middleware for this URL to work. With earlier versions you need to specify the full URL like this: http://localhost:8080/webpack-dev-server/index.html.
  • To get a non-autoreloading version of the page use http://localhost:8080/index.html.
@eevee
eevee / gist:9cf655e617859d2765f7
Created September 4, 2014 00:40
outline shader for THREE.js
var outline_shader = {
uniforms: {
"linewidth": { type: "f", value: 0.3 },
},
vertex_shader: [
"uniform float linewidth;",
"void main() {",
"vec4 mvPosition = modelViewMatrix * vec4( position, 1.0 );",
"vec4 displacement = vec4( normalize( normalMatrix * normal ) * linewidth, 0.0 ) + mvPosition;",
"gl_Position = projectionMatrix * displacement;",
@staltz
staltz / introrx.md
Last active November 27, 2025 14:07
The introduction to Reactive Programming you've been missing
void setup() {
size(500, 500);
rectMode(CENTER);
noStroke();
}
float x, y, t, tt;
color c1 = color(32), c2 = color(240, 0, 0), cb = color(245);
int N = 10;
float spm = 60, sp, l1 = spm/2, l2 = spm/4;
@MattesGroeger
MattesGroeger / vb_bootcamp.sh
Created January 18, 2014 12:35
I use the following script to boot my Windows 7 bootcamp partition under OSX with VirtualBox. Replace the name of your Bootcamp partition and the name of your VirtualBox image accordingly. The script was written after following this description: http://www.kevinrockwood.info/2010/04/windows7-in-osx-with-bootcamp-and-virtualbox/
#!/bin/sh
# find and unmount volume (change 'BOOTCAMP' name accordingly)
amount=`diskutil list | grep BOOTCAMP | wc -l`
if [ $amount = 1 ]
then
path=`diskutil list | grep BOOTCAMP | sed -e 's/^\(.*\)\(disk0s.\)$/\/dev\/\2/g'`
sudo chmod 777 $path
diskutil unmount $path
fi
@builtbylane
builtbylane / angular-remove-white-space-filter.js
Created October 30, 2013 18:43
AngularJS – filter: removes white space from text. useful for html values that cannot have spaces
/**
* Description:
* removes white space from text. useful for html values that cannot have spaces
* Usage:
* {{some_text | nospace}}
*/
app.filter('nospace', function () {
return function (value) {
return (!value) ? '' : value.replace(/ /g, '');
@aras-p
aras-p / preprocessor_fun.h
Last active November 24, 2025 16:27
Things to commit just before leaving your job
// Just before switching jobs:
// Add one of these.
// Preferably into the same commit where you do a large merge.
//
// This started as a tweet with a joke of "C++ pro-tip: #define private public",
// and then it quickly escalated into more and more evil suggestions.
// I've tried to capture interesting suggestions here.
//
// Contributors: @r2d2rigo, @joeldevahl, @msinilo, @_Humus_,
// @YuriyODonnell, @rygorous, @cmuratori, @mike_acton, @grumpygiant,
@dypsilon
dypsilon / frontendDevlopmentBookmarks.md
Last active November 16, 2025 11:36
A badass list of frontend development resources I collected over time.
@jakeonrails
jakeonrails / Ruby Notepad Bookmarklet
Created January 29, 2013 18:08
This bookmarklet gives you a code editor in your browser with a single click.
data:text/html, <style type="text/css">#e{position:absolute;top:0;right:0;bottom:0;left:0;}</style><div id="e"></div><script src="http://d1n0x3qji82z53.cloudfront.net/src-min-noconflict/ace.js" type="text/javascript" charset="utf-8"></script><script>var e=ace.edit("e");e.setTheme("ace/theme/monokai");e.getSession().setMode("ace/mode/ruby");</script>