Eventually platforms outgrow the single-source-tree model and become distributed systems. A common pattern in these distributed systems is distributed composition via event buffering. Here we motivate and describe this event buffering pattern.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
openstack-cookbooks | |
.vagrant | |
cache |
I never really liked the way pointers are declared in C/C++:
int *a, *b, *c; // a, b and c are pointers to int
The reason is that I am used to reading variable declarations as MyType myVar1, myVar2, myVar3;
and I always read “int*
” as the type “integer pointer”�. I therefore wanted the following
int* a, b, c; // a is a pointer to int, b and c are ints
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def be_guest_member_of(expected) | |
Class.new do | |
def initialize(expected) | |
@expected = expected | |
end | |
def matches?(target) | |
@target = target | |
@target.memberships.where(role: "guest").map(&:network).include? @expected | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Stripe CTF - Work Notes | |
mpetrov ([email protected]) | |
These notes are very rough. They should give a general idea of how each level was solved. | |
---- LEVEL 01 (login: e9gx26YEb2) ----- | |
Solution: modifying PATH env variable | |
Password: kxlVXUvzv | |
date.c |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Copyright (c) 2012 Anthony Wu, twitter.com/anthonywu | |
Permission is hereby granted, free of charge, to any person obtaining | |
a copy of this software and associated documentation files (the | |
"Software"), to deal in the Software without restriction, including | |
without limitation the rights to use, copy, modify, merge, publish, | |
distribute, sublicense, and/or sell copies of the Software, and to | |
permit persons to whom the Software is furnished to do so, subject to | |
the following conditions: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- This will give us a table that has a row for each resource but includes all of the events related to the | |
-- resource on the row. Calling array_agg will load all of the data in memory which means that I can do math | |
-- on the set really quickly. Also, callers of this query will be able to get all of the data for the invoice | |
-- in one shot. | |
create view invoice as | |
select | |
a.resource_id, | |
sum(a.qty) as qty, | |
array_agg(hstore(a.*)) as events_collection |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class PostsController < ActionController::Base | |
def create | |
Post.create(post_params) | |
end | |
def update | |
Post.find(params[:id]).update_attributes!(post_params) | |
end | |
private |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The bridge is now located at https://github.com/fjolnir/TLC |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env sh | |
## | |
# This is script with usefull tips taken from: | |
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx | |
# | |
# install it: | |
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh | |
# |