Skip to content

Instantly share code, notes, and snippets.

View v42's full-sized avatar
🦊
OH MY COTTON SOCKS!

Vitor Carlos v42

🦊
OH MY COTTON SOCKS!
View GitHub Profile
@v42
v42 / gist:5970165
Last active December 19, 2015 14:38
Modal keyboard control suggestion to Mutly. Quick and dirty way, of course! ;)
$('body').on('keyup', function(e){
switch(e.keyCode) {
case 27:
$('.the-job.opened .close').click()
break
case 37:
$('.wrap-carousel .prev').click()
break
case 39:
$('.wrap-carousel .next').click()
@v42
v42 / main.js
Last active December 17, 2015 21:19
An approach for section-based behaviours on websites.
;(function() {
window.App = (function() {
var init = function() {
var section = getSection()
coreBehaviours()
sectionBehaviours(section)
console.log("It's on! ;)")
}
@v42
v42 / OpenGL Racing Game
Last active December 14, 2015 05:29
An old game I made in 2010 when I was learning OpenGL at college, just intending to save it here.
#include <c:/dev-cpp/include/gl/glut.h>
#include <math.h>
#include <stdio.h>
#include <string.h>
#define VALOR_PI 3.14159265;
// estrutura que descreve um ponto (x,y)
typedef struct ponto {
GLfloat x, y;
}p;
@v42
v42 / triforce.js
Created September 28, 2012 17:09
Triforce Typing Detection in Javascript
/*
*  ▲
* ▲ ▲
*
* Newfags can't triforce.
*
* TODO: detect on mac (white triangles) and test detection on linux
*/
var kpr = [],