Skip to content

Instantly share code, notes, and snippets.

View bjrmatos's full-sized avatar

BJR Matos bjrmatos

View GitHub Profile
@bjrmatos
bjrmatos / gsa.js
Last active August 26, 2015 21:44 — forked from mwcz/gsa.js
(mostly complete) CasperJS script to configure the Dynamic Navigation section of a GSA, because Google's API doesn't provide that ability...
(function () {
var system = require('system');
var casper = require('casper').create({
clientScripts : [ 'jquery.min.js' ],
waitTimeout : 30000, // ms
logLevel : 'debug', // info, debug, warning, or error
verbose : system.args.indexOf('-v') >= 0
});
@bjrmatos
bjrmatos / .editorconfig
Last active August 29, 2015 14:00
my personal .editorconfig
# EditorConfig helps developers define and maintain consistent
# coding styles between different editors and IDEs
# editorconfig.org
root = true
[*]
# Change these settings to your own preference
indent_style = space
@bjrmatos
bjrmatos / .jshintrc
Last active August 29, 2015 14:00
My personal configuration .jshintrc
{
// Documentation: http://www.jshint.com/docs/options/
// Predefined globals who JSHint will ignore.
"browser": true, // Standard browser globals e.g. `window`, `document`.
"node": true,
"rhino": false,
"couch": false,
"wsh": false, // Windows Scripting Host.
@bjrmatos
bjrmatos / cookie-options.json
Last active August 29, 2015 14:00
Explanation of configuration for create cookies in express
@bjrmatos
bjrmatos / forever.txt
Created May 2, 2014 14:48
Run forever with logs
sudo forever start -l /path/to/forever.log -o /path/to/out.log -e /path/to/err.log -c node app.js
@bjrmatos
bjrmatos / app.js
Created May 12, 2014 16:10 — forked from robertklep/app.js
Express vhosting
var express = require('express');
var app = express();
var app2 = express();
app.use(express.vhost('app1.example.com', require('./app1').app));
app.use(express.vhost('app2.example.com', app2));
app2.get('/', function(req, res) {
res.send('app 2');
@bjrmatos
bjrmatos / example.css
Created May 13, 2014 17:19
CSS Order of properties
.declaration-order {
content: '';
/* Positioning */
position: relative;
top: 0;
right: 0;
bottom: 0;
left: 0;
@bjrmatos
bjrmatos / example.css
Created May 13, 2014 17:20
CSS Hide text
.hide-text {
text-indent: 100%;
white-space: nowrap;
overflow: hidden;
}
// antigua tecnica
.hide-text{
text-indent: -9999px;
}
@bjrmatos
bjrmatos / example.css
Created May 13, 2014 17:21
CSS Full width and height element (ligthbox wrapper)
.element {
position: fixed;
top: 0;
bottom: 0;
left: 0;
right: 0;
}
@bjrmatos
bjrmatos / example.css
Created May 13, 2014 17:23
CSS Vertical and Horizontal center
.centrar {
width: 300px;
height: 200px;
position: absolute;
left: 50%;
top: 50%;
margin-left: -150px; /*(width/2)*/
margin-top: -100px; /*(height/2)*/
}