Skip to content

Instantly share code, notes, and snippets.

View AgtLucas's full-sized avatar
🌎
💀⏳🌷

Lucas AgtLucas

🌎
💀⏳🌷
View GitHub Profile
@bevacqua
bevacqua / pluck.js
Created February 7, 2014 16:00
Declarative variable names make for such readable code!
function pluck (a, prop) {
return a.map(function (a) { return a[prop]; });
}
@KittyGiraudel
KittyGiraudel / SassMeister-input.scss
Last active August 29, 2015 13:57
Generated by SassMeister.com.
// ----
// libsass (v3.1.0-beta)
// ----
/// Power function
/// @param {Number} $x
/// @param {Number} $n
/// @return {Number}
@function pow($x, $n) {
$ret: 1;
@bradfrost
bradfrost / gist:9856884
Last active August 29, 2015 13:57
Using Grunt with Pattern Lab
module.exports = function(grunt) {
// Configuration
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
shell: {
patternlab: {
command: "php core/builder.php -gp"
}
},
@bennadel
bennadel / object-watch.htm
Created May 9, 2014 12:04
Watching Object Literal Expressions In AngularJS
<!doctype html>
<html ng-app="Demo">
<head>
<meta charset="utf-8" />
<title>
Watching Object Literal Expressions In AngularJS
</title>
</head>
<body ng-controller="AppController">

Brazilian TLD Applicants

TLD Company
.ITAU Itau Unibanco Holding S.A.
.BRADESCO Banco Bradesco S.A.
.IPIRANGA Ipiranga Produtos de Petroleo S.A.
.BOM Núcleo de Informação e Coordenação do Ponto BR - NIC.br
.FINAL Núcleo de Informação e Coordenação do Ponto BR - NIC.br
.RIO Empresa Municipal de Informática SA - IPLANRIO
// This gist is based on eve (https://github.com/adobe-webplatform/eve), but really any event based API will do
// Idea is to recreate backbone-like model, but on events only
// Model here is a hash-map, but it shouldn’t be. You could implement any structure this way.
function model(id) {
var modelid = ["model", id],
name = function () {
return modelid.concat.apply(modelid, arguments);
};
enum Suit {
case Clubs, Diamonds, Hearts, Spades
}
enum Rank {
case Jack, Queen, King, Ace
case Num(Int)
}
struct Card {
import java.util.Scanner;
public class FirstFit {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
System.out.println("Entre com o número de processos:");
int p = in.nextInt();

Hey there!

I'm pleased to announce that [the Pony Foo blog][1] has been completely rewritten from scratch! I've put a few months into it, but I got in many improvements, which I'm going to write a few articles about. Firstly, I wanted to write this email to introduce you to some of the concepts introduced to the engine.

Features

The blog is now backed by [NGINX][3], properly and aggressively caching static assets. I'm using [recluster][4] to achieve zero-downtime deployments while keeping the application servers on two separate processes. I've moved away from Heroku, and now the production environment is hosted on AWS EC2. It's provisioned, configured with sensitive environment variables, and deployed-to using [fast bash scripts][5].

Bash? Non-sense!

/** @jsx React.DOM */
var ReadingTimeWidget = React.createClass({
getInitialState: function() {
return ({
secondsRequired: null,
});
},
componentWillMount: function() {
var cdiv = this.props.contentDiv;