Skip to content

Instantly share code, notes, and snippets.

View jonataswalker's full-sized avatar
💭
I may be slow to respond.

Jonatas Walker jonataswalker

💭
I may be slow to respond.
View GitHub Profile
@jonataswalker
jonataswalker / nginx.conf
Last active August 31, 2015 14:41 — forked from plentz/nginx.conf
Best nginx configuration for improved security(and performance). Complete blog post here http://tautt.com/best-nginx-configuration-for-security/
# to generate your dhparam.pem file, run in the terminal
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048
@jonataswalker
jonataswalker / object-watch.js
Last active August 29, 2015 14:27 — forked from eligrey/object-watch.js
object.watch polyfill in ES5
/*
* object.watch polyfill
*
* 2012-04-03
*
* By Eli Grey, http://eligrey.com
* Public Domain.
* NO WARRANTY EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK.
*/
@jonataswalker
jonataswalker / build-tree-from-directory.php
Last active April 2, 2024 18:40
Build a tree (array or json) from any directory.
<?php
**
* Public Domain.
* @author Jonatas Walker
* Based in: http://kvz.io/blog/2007/10/03/convert-anything-to-tree-structures-in-php/
* Usage:
* $root = '/home/www/';
* $allow_ext = array('jpg','gif');
* $exclude_dir = array('tilemill');
* $prefix = 'small';
@jonataswalker
jonataswalker / Q.js Examples
Last active August 29, 2015 14:26 — forked from guptag/Q.js Examples
Q.js examples - Small snippets to understand various api methods in Q.js
//To run Q.js examples:
// 1. Open a new browser tab in Chrome and turn on developer toolbar.
// 2. Copy/Paste this gist in the console and hit enter to run all the snippets.
// Based on the inspiration from samples @ https://github.com/kriskowal/q
////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////