Skip to content

Instantly share code, notes, and snippets.

View zeropaper's full-sized avatar
💅
I may be slow to respond.

Valentin Vago zeropaper

💅
I may be slow to respond.
View GitHub Profile
@zeropaper
zeropaper / gist:5775266
Last active December 18, 2015 11:20
just a little utility to test some webservice
var http = require('http');
var host = 'test.domain.com';
var apiUrl = 'http://'+ host +'/api/v1';
var URI = require('URIjs');
var async = require('async');
var _ = require('underscore');
var cookies = {};
@zeropaper
zeropaper / sync.js
Created June 4, 2013 06:08
Very very simple "sync" for Backbone & Redis
/*jslint indent: 2, node: true*/
'use strict';
var _ = require('underscore');
var redis = require('redis');
module.exports = function(options) {
options = _.clone(options || {});
_.defaults(options, {
port: 6379,
host: '127.0.0.1',
options: {},
@zeropaper
zeropaper / small-dialog-example.js
Created December 2, 2011 13:58
A tiny piece of JS to handle dialogs
(function($){
var C = typeof console == 'object' ? console : {info: function(){}, log: function(){}, error: function(){}};
var searchSettings = {
id: 'search-dialog',
el: $('#top-menu .search')[0],
keepClosed: true,
type: 'search',
content: $('#js-page-search-form').html(),
outerWidth: $tm.outerWidth(),
@zeropaper
zeropaper / YOURMODULENAME.module.php
Created September 27, 2011 11:10
A simple theming function override to display the generated .info file for the features module
<?php
/**
* Implements hook_theme_registry_alter()
*/
function YOURMODULENAME_theme_registry_alter(&$items) {
$items['features_components']['function'] = 'YOURMODULENAME_features_components';
}
@zeropaper
zeropaper / CSS3-Smilies.html
Created December 14, 2010 14:07
CSS3-Smilies
<style type="text/css">
.smiley {
background-color: rgb(0, 0, 0);
color: rgb(255, 255, 255);
display: inline-block;
width: 16px;
height: 16px;
line-height: 16px;
font-size: 12px;
text-align: center;
// $Id$
//
jQuery UI screen structure and presentation
This CSS file was generated by ThemeRoller, a Filament Group Project for jQuery UI
Author: Scott Jehl, scott@filamentgroup.com, http://www.filamentgroup.com
Visit themeroller.com
@import compass/utilities/general/reset.sass
@import compass/utilities/general/float.sass