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:
[ | |
"Canada" => "ca", | |
"United States" => "us", | |
"Afghanistan" => "af", | |
"Albania" => "al", | |
"Algeria" => "dz", | |
"American Samoa" => "as", | |
"Andorra" => "ad", | |
"Angola" => "ad", | |
"Anguilla" => "ai", |
alias gl="git log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit" |
<?php | |
/** | |
* Check if a given ip is in a network. | |
* | |
* @see https://gist.github.com/ryanwinchester/578c5b50647df3541794 | |
* | |
* @param string $ip IP to check in IPV4 format eg. 127.0.0.1 | |
* @param string $range IP/CIDR netmask eg. 127.0.0.0/24, also 127.0.0.1 is accepted and /32 assumed |
# Before Script | |
before_script: | |
- composer self-update | |
- composer install --prefer-dist > /dev/null | |
- cp .env.example .env | |
- php artisan key:generate | |
- php artisan migrate:refresh | |
# Services | |
services: |
#!/bin/bash | |
# Erlang | |
ERLANG_VERSION=${ERLANG_VERSION:-19.0} | |
ERLANG_CACHED_DOWNLOAD="${HOME}/cache/OTP-${ERLANG_VERSION}.tar.gz" | |
ERLANG_DIR=${ERLANG_DIR:="$HOME/erlang"} | |
# Elixir | |
ELIXIR_VERSION=${ELIXIR_VERSION:-1.3.1} | |
ELIXIR_CACHED_DOWNLOAD="${HOME}/cache/elixir-v${ELIXIR_VERSION}.zip" |
The Erlang VM only allows a limited set of expressions as guards:
==
, !=
, ===
, !==
, >
, <
, <=
, >=
);and
, or
) and negation operators (not
, !
);+
, -
, *
, /
);<>
and ++
as long as the left side is a literal;in
operator;If you want a run-down of the 1.3 changes and the design decisions behind those changes, check out the LonestarElixir Phoenix 1.3 keynote: https://www.youtube.com/watch?v=tMO28ar0lW8
To use the new phx.new
project generator, you can install the archive with the following command:
$ mix archive.install https://github.com/phoenixframework/archives/raw/master/phx_new.ez
Phoenix v1.3.0 is a backwards compatible release with v1.2.x. To upgrade your existing 1.2.x project, simply bump your phoenix dependency in mix.exs
:
import requests | |
class HoverException(Exception): | |
pass | |
class HoverAPI(object): | |
def __init__(self, username, password): | |
params = {"username": username, "password": password} | |
r = requests.post("https://www.hover.com/api/login", params=params) |
<?php | |
// PHP using Guzzle example | |
use GuzzleHttp\Client; | |
$client = new Client(); | |
$mac_address = "FC:FB:FB:01:FA:21"; |