Skip to content

Instantly share code, notes, and snippets.


Lucas AgtLucas

Block or report user

Report or block AgtLucas

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View README.rst

Markdown and reStructuredText

GitHub supports several lightweight markup languages for documentation; the most popular ones (generally, not just at GitHub) are Markdown and reStructuredText. Markdown is sometimes considered easier to use, and is often preferred when the purpose is simply to generate HTML. On the other hand, reStructuredText is more extensible and powerful, with native support (not just embedded HTML) for tables, as well as things like automatic generation of tables of contents.



2min screencast


stopBefore(document, 'getElementById')
stopBefore('document.getElementById') // the same as the previous
stopBefore(Element.prototype, 'removeChild')
View 0_namespacing.scss
mymodule {
@at-root {
.#{&}-header { ... }
.#{&}-footer { ... }
.#{&}-body {
a { ... }
span { ... }
p { ... }

DocPad: Minify your assets with Grunt

The following will minify your assets with grunt each time a generation write completes.


  1. Install Dependencies
echo "What should the Application be called (no spaces allowed e.g. GCal)?"
read inputline
echo "What is the url (e.g."
read inputline
View twitter_streaming.js
var util = require('util'),
http = require('http'),
events = require('events');
var Twitter = function(opts) {
this.username = opts.username;
this.password = opts.password;
this.track = opts.track; = '';
View gist:6263457
$(document).on('submit', 'form[data-pjax]', function(event) {
$.pjax.submit(event, '#pjax-container')
AgtLucas / gist:6320968
Last active Dec 21, 2015
Seam Framework presentation - 1
View gist:6320968
// Indica que a classe User é um Entity Bean
// Um componente Seam, seu nome precisa ser unico dentro da aplicação
// Sempre que o Seam instancia um componente, ele liga a nova instância a uma variável de contexto,
// nesse caso é um componente no escopo de sessão
// Indica que a classe User é mapeada para a tabela users no BD
public class User implements Serializable {
AgtLucas / gist:6321065
Created Aug 23, 2013
Seam Framework presentation - 2
View gist:6321065
public class RegisterAction implements Register {
// Annotation que indica que o atributo foi injetado pelo Seam, neste caso, injetado de contexto user
private User user;
// EJB3 entity manager
View .jshintrc
"bitwise": true,
"eqeqeq": true,
"eqnull": true,
"immed": true,
"newcap": true,
"esnext": true,
"latedef": true,
"noarg": true,
"node": true,
You can’t perform that action at this time.