Skip to content

Instantly share code, notes, and snippets.

class DynamodbLocal < Formula
desc "Client-side database and server imitating DynamoDB"
homepage "https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Tools.DynamoDBLocal.html"
url "https://s3-us-west-2.amazonaws.com/dynamodb-local/dynamodb_local_latest.tar.gz"
version "2016-05-17"
sha256 "d79732d7cd6e4b66fbf4bb7a7fc06cb75abbbe1bbbfb3d677a24815a1465a0b2"
bottle :unneeded
def data_path
@plagelao
plagelao / robot.js
Created December 5, 2012 16:45
plagebot
//FightCode can only understand your robot
//if its class is called Robot
var Robot = function(robot) {
};
Robot.prototype.onIdle = function(ev) {
var robot = ev.robot;
robot.turn(1)
@plagelao
plagelao / love.md
Created April 28, 2012 17:25
Things I love from the internet

This is a canon of the things I love. Things that I come back to, things that have really touch me. Doing this exercise I have realized how little things do I come back to... Still, there are some tabs I have opened always on my browser.

The first one is related to github and how they work. It's a presentation and a series of 3 blog post about how they work. It is really inspiring and I have read it a couple of times in the last 2 weeks:

http://zachholman.com/posts/how-github-works/

The second one is a presentation Sebastian Hermida shared with me a while ago. I have watched the whole of it just once, but I've watch some parts 2 or 3 times already. It is a talk by Bret Victor about inventing, fighting, feedback... well, a lot of things, but it is really good:

http://vimeo.com/36579366

@plagelao
plagelao / gist:1144782
Created August 14, 2011 10:39
fizzbuzz FP style
def fizzbuzz_strings
fizz = ->(number) { 'fizz' }
buzz = ->(number) { 'buzz' }
default = ->(number) { number.to_s }
[fizz, buzz, default]
end
def fizzbuzz_rules
multiple_of_3 = ->(number) { number % 3 == 0 }
@plagelao
plagelao / gist:859568
Created March 8, 2011 00:13
my vim shortcuts
let mapleader = ","
@plagelao
plagelao / mixins.sass
Created March 7, 2011 23:14
SASS examples
=gradient(!top, !bottom)
background-image: -moz-linear-gradient(top, !top, !bottom)
background-image: -webkit-gradient(linear,left top,left bottom,color-stop(0, !top),color-stop(1, !bottom))
background-image: -webkit-linear-gradient(!top, !bottom)
background-image: linear-gradient(top, !top, !bottom)
filter: progid:DXImageTransform.Microsoft.gradient(startColorStr='!top', EndColorStr='! bottom')
@plagelao
plagelao / gist:853872
Created March 3, 2011 23:45
vim plugins
" vundle
set rtp+=~/.vim/vundle.git/
call vundle#rc()
@plagelao
plagelao / .vimrc
Created February 27, 2011 17:12
Presentation, colors and syntax
" file syntax color on
syntax on
filetype on " enable file type detection
" colors
set t_Co=256 " use 256 colors
" show when you are in insert or visual mode
set showmode
@plagelao
plagelao / bdd.rb
Created February 20, 2011 21:51
Testing twitter authentication
OmniAuth.config.test_mode = true
OmniAuth.config.mock_auth[:twitter] = {
'provider' => 'twitter',
'uid' => '1234',
'user_info' => {'name' => user_name}
}
Given a "XBox" with a price of "250€"
When I ask for the catalogue
Then I can see in the catalogue a "XBox" with a price of "250€"