Skip to content

Instantly share code, notes, and snippets.

View kevcenteno's full-sized avatar
🥗

Kevin Centeno kevcenteno

🥗
View GitHub Profile
(function () {
var cheatDelay = 1000; //set how fast you want to cheat
var cheat = function () {
var boxArr, tempColor, i, $firstBox, $tempBox;
boxArr = $('#box').find('span');
$firstBox = $(boxArr[0]);
$firstBox.click(); //just click the first box in case it's the win
tempColor = $firstBox.css('background-color');
@kevcenteno
kevcenteno / ubuntu-setup.sh
Created August 23, 2014 13:53
ubuntu-setup
#!/bin/bash
############################################################
# core functions
############################################################
function check_install {
if [ -z "`which "$1" 2>/dev/null`" ]
then
executable=$1
@kevcenteno
kevcenteno / SassMeister-input.scss
Created July 25, 2014 17:28
Generated by SassMeister.com.
// ----
// Sass (v3.3.10)
// Compass (v1.0.0.alpha.20)
// ----
.dog {
display: block;
&__title {
colour: purple;
}
@kevcenteno
kevcenteno / cluster
Created April 10, 2014 18:10
cluster.js
http = require('http');
fs = require('fs');
cluster = require('cluster');
numCPUs = require('os').cpus().length;
console.log(numCPUs);
blockWriter = {};
blockWriter.arr = [];
blockWriter.count = 0;
blockWriter.countLimit = 20;
@kevcenteno
kevcenteno / logger.js
Last active August 29, 2015 13:58
nodejs logger
http = require('http');
fs = require('fs');
blockWriter = {};
blockWriter.arr = [];
blockWriter.count = 0;
blockWriter.countLimit = 10;
blockWriter.blockLog = "";
server = http.createServer( function(req, res) {