Skip to content

Instantly share code, notes, and snippets.

/**
* iOS 6 style switch checkboxes
* by Lea Verou http://lea.verou.me
*/
:root input[type="checkbox"] { /* :root here acting as a filter for older browsers */
position: absolute;
opacity: 0;
}
@ruzz311
ruzz311 / Gruntfile.js
Created July 11, 2013 20:13 — forked from kristoferjoseph/Gruntfile.js
Helpful build config
/*global module:false, require:false*/
var path = require('path'),
lrSnippet = require('grunt-contrib-livereload/lib/utils').livereloadSnippet;
var folderMount = function folderMount(connect, point) {
return connect.static(path.resolve(point));
};
module.exports = function(grunt) {
@ruzz311
ruzz311 / twilio-express.js
Last active December 18, 2015 12:28
playing with twilio
/**
* Module dependencies.
*/
var express = require('express'),
http = require('http'),
path = require('path'),
twilio = require('twilio'),
radish = "\"In all my days as a turnip farmer, I have not yet experienced the love, of a white radish!\", thought the farmer as he sighed then walked up the dusty warn trail, towards the barn. How long had he been there? One hour? Two Hours? The sun was shining bright and warm against the old man's skin and that's when he drifted off to sleep.";
persona = {
// install the 'request' package first with 'npm install request'
var request = require('request');
// replace with your Keen IO project token
var projectToken = "501999234-FAKE-PROJECT-ID";
// create a sample JSON event for an event collection
var eventCollection = "meals";
var sampleEvent = {
username: "ralph",
@ruzz311
ruzz311 / a2VHost install.sh
Created March 28, 2013 02:32
Some things I installed to get a nodejs app server running on a2Hosting's CloudVM (ubuntu)
sudo apt-get install git;
sudo apt-get install python g++ make;
sudo apt-get install python-software-properties;
sudo apt-get install g++ curl libssl-dev apache2-utils;
sudo apt-get update;
sudo add-apt-repository ppa:chris-lea/node.js;
sudo apt-get update;
sudo apt-get install nodejs;
@ruzz311
ruzz311 / BeautifulFaces.js
Last active December 14, 2015 07:39 — forked from joelongstreet/BeautifulFaces.js
BeautifulFaces.js (for NVM users) Dependencies: imagesnap (http://iharder.sourceforge.net/current/macosx/imagesnap/) Description: Save this script as a post-commit hook to snap a photo of yourself and save it with your commit message
#!/usr/bin/env node
//
// BeautifulFaces.js
// https://gist.github.com/joelongstreet/5052198
//
// Dependencies:
// imagesnap (npm install -g imagesnap)
// Description:
// Save this script as a post-commit hook to snap a photo of yourself and
// save it with your commit message
@ruzz311
ruzz311 / tcp.socketServer.js
Created October 16, 2012 06:19
TCP socket with Node.js
var net = require('net'), server, s;
// socket events
s = {
onStart: function(){
console.log('server started')
},
onClientConnect: function(conn){
@ruzz311
ruzz311 / dabblet.css
Created September 20, 2012 18:21
Untitled
.pulse, .btn:hover {
-webkit-animation-name: tada;
-moz-animation-name: tada;
-o-animation-name: tada;
animation-name: tada;
}
.tada, .btn:active {
-webkit-animation-name: tada;
-moz-animation-name: tada;
@ruzz311
ruzz311 / timer.js
Created August 30, 2012 17:11
Timer.js - AMD module used for accurate, long timers
define([
"namespace",
// Libs
"use!jquery",
"use!backbone"
// Modules
// Plugins
],
function( namespace, $, Backbone ) {
@ruzz311
ruzz311 / maths-example.js
Created December 1, 2011 14:22
An example of implementing a module
var circle = require( './maths' )
var area = circle.area( 4 );
var circumference = circle.circumference( 4 );