This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.
To capture the video (filesize: 19MB), using the free "QuickTime Player" application:
class Api::RegistrationsController < Api::BaseController | |
respond_to :json | |
def create | |
user = User.new(params[:user]) | |
if user.save | |
render :json=> user.as_json(:auth_token=>user.authentication_token, :email=>user.email), :status=>201 | |
return | |
else |
/* | |
* This work is free. You can redistribute it and/or modify it under the | |
* terms of the Do What The Fuck You Want To Public License, Version 2, | |
* as published by Sam Hocevar. See the COPYING file for more details. | |
*/ | |
/* | |
* Easing Functions - inspired from http://gizma.com/easing/ | |
* only considering the t value for the range [0, 1] => [0, 1] | |
*/ | |
EasingFunctions = { |
/* | |
This example shows how you can use your data structure as a basis for | |
your Firebase security rules to implement role-based security. We store | |
each user by their Twitter uid, and use the following simplistic approach | |
for user roles: | |
0 - GUEST | |
10 - USER | |
20 - MODERATOR |
container_commands: | |
sync_db: | |
command: "docker run --env DATABASE_URL=`/opt/elasticbeanstalk/bin/get-config environment | jq -r .DATABASE_URL` aws_beanstalk/current-app:latest lein lobos migrate" | |
leader_only: true |
This is an example usage of registering an update_hook
to a SQLite connection. The motivation for exploring this feature is to test out various implementations of data monitoring interfaces.
A few notable properties of the implementation:
INSERT
and UPDATE
operation requires a subsequent SELECT
to get the row data.bufsize
under heavy workloads will improve throughput, but the SQLite library is single-threaded by design.########### | |
# Variables | |
########### | |
variable "aws_key_name" { | |
default = "mykeypair" | |
} | |
variable "region" { | |
default = "eu-west-1" | |
} |
resource "aws_iam_instance_profile" "beanstalk_service" { | |
name = "beanstalk-service-user" | |
roles = ["${aws_iam_role.beanstalk_service.name}"] | |
} | |
resource "aws_iam_instance_profile" "beanstalk_ec2" { | |
name = "beanstalk-ec2-user" | |
roles = ["${aws_iam_role.beanstalk_ec2.name}"] | |
} |
export const CACHE_STALE_AT_HEADER = 'x-edge-cache-stale-at'; | |
export const CACHE_STATUS_HEADER = 'x-edge-cache-status'; | |
export const CACHE_CONTROL_HEADER = 'Cache-Control'; | |
export const CLIENT_CACHE_CONTROL_HEADER = 'x-client-cache-control'; | |
export const ORIGIN_CACHE_CONTROL_HEADER = 'x-edge-origin-cache-control'; | |
enum CacheStatus { | |
HIT = 'HIT', | |
MISS = 'MISS', | |
REVALIDATING = 'REVALIDATING', |