Skip to content

Instantly share code, notes, and snippets.

View soncco's full-sized avatar
🏠
Working from home

Braulio Soncco soncco

🏠
Working from home
View GitHub Profile
@soncco
soncco / gist:3616266
Created September 4, 2012 03:35
Show fields in view template
print print_r(array_keys($fields), 1);
@soncco
soncco / gist:3616267
Created September 4, 2012 03:35
Show fields in view template
print print_r(array_keys($fields), 1);
@soncco
soncco / gist:4355549
Created December 21, 2012 20:23
Responsive Facebook Comments
<style>
.fb-comments, .fb-comments iframe[style], .fb-like-box, .fb-like-box iframe[style] {width: 100% !important;}
.fb-comments span, .fb-comments iframe span[style], .fb-like-box span, .fb-like-box iframe span[style] {width: 100% !important;}
</style>
@soncco
soncco / gist:4392198
Created December 27, 2012 21:33
Drupal Nginx Configuration
server {
server_name www.example.com example.com;
access_log /srv/www/www.example.com/logs/access.log;
error_log /srv/www/www.example.com/logs/error.log;
root /srv/www/www.example.com/public_html;
rewrite ^/([^/])/(.)(/?)$ /$1/index.php?q=$2&$args;
error_page 500 502 503 504 /50x.html;
location = /50x.html {
@soncco
soncco / gist:4392201
Created December 27, 2012 21:33
Drupal Nginx Configuration
server {
server_name www.example.com example.com;
access_log /srv/www/www.example.com/logs/access.log;
error_log /srv/www/www.example.com/logs/error.log;
root /srv/www/www.example.com/public_html;
rewrite ^/([^/])/(.)(/?)$ /$1/index.php?q=$2&$args;
error_page 500 502 503 504 /50x.html;
location = /50x.html {
@soncco
soncco / gist:4392206
Created December 27, 2012 21:34
Drupal Nginx Configuration
server {
server_name www.example.com example.com;
access_log /srv/www/www.example.com/logs/access.log;
error_log /srv/www/www.example.com/logs/error.log;
root /srv/www/www.example.com/public_html;
rewrite ^/([^/])/(.)(/?)$ /$1/index.php?q=$2&$args;
error_page 500 502 503 504 /50x.html;
location = /50x.html {

Step 1: Clone the bundles into your Sublime Text packages directory

cd ~/Library/Application\ Support/Sublime\ Text\ 2/Packages
git clone git://github.com/jashkenas/coffee-script-tmbundle CoffeeScript
git clone https://github.com/miksago/jade-tmbundle.git Jade
git clone https://github.com/LearnBoost/stylus.git Stylus

Step 2: Restart Sublime Text 2

@soncco
soncco / index.jade
Last active December 17, 2015 17:19
Initializr HTML5 Responsive with Jade and Stylus
doctype
//if lt IE 7
html.no-js.lt-ie9.lt-ie8.lt-ie7
//if IE 7
html.no-js.lt-ie9.lt-ie8
//if IE 8
html.no-js.lt-ie9
//[if gt IE 8]><!
html.no-js
//<![endif]
// module dependencies
var http = require('http'),
url = require('url');
/**
* UrlReq - Wraps the http.request function making it nice for unit testing APIs.
*
* @param {string} reqUrl The required url in any form
* @param {object} options An options object (this is optional)
@soncco
soncco / package.json
Created September 11, 2013 17:33
El package.json más básico del mundo.
{
"name": "curso-backend",
"version": "0.0.1",
"dependencies": {
"express": "~3.4.0"
}
}