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:
gifify() { | |
if [[ -n "$1" ]]; then | |
if [[ $2 == '--good' ]]; then | |
ffmpeg -i $1 -r 10 -vcodec png out-static-%05d.png | |
time convert -verbose +dither -layers Optimize -resize 600x600\> out-static*.png GIF:- | gifsicle --colors 128 --delay=5 --loop --optimize=3 --multifile - > $1.gif | |
rm out-static*.png | |
else | |
ffmpeg -i $1 -s 600x400 -pix_fmt rgb24 -r 10 -f gif - | gifsicle --optimize=3 --delay=3 > $1.gif | |
fi | |
else |
#!/bin/bash | |
# Usage: | |
# sudo ./install-iojs-nightly.sh | |
# or for next-nightly: | |
# sudo ./install-iojs-nightly.sh next | |
type=nightly | |
if [ "X$1" == "Xnext" ]; then | |
type=next-nightly |
// Thanks to @isntitvacant (https://github.com/chrisdickinson) for optimizing the | |
// bit shift performance tweaks. | |
var SB = require('buffer').SlowBuffer; | |
var ITER = 2e4; | |
var SIZE = 1e3; | |
function genPrimes(max) { | |
var primes = new Array(); | |
var len = (max >>> 3) + 1; |
I've been using a lot of Ansible lately and while almost everything has been great, finding a clean way to implement ansible-vault wasn't immediately apparent.
What I decided on was the following: put your secret information into a vars
file, reference that vars
file from your task
, and encrypt the whole vars
file using ansible-vault encrypt
.
Let's use an example: You're writing an Ansible role and want to encrypt the spoiler for the movie Aliens.
OSX ships with bash 3 by default, but you need bash 4 to use npx shell auto fallback. Using homebrew:
(instructions borrowed from https://github.com/Homebrew/homebrew-command-not-found)
brew update && brew install bash
# Add the new shell to the list of allowed shells
sudo bash -c 'echo /usr/local/bin/bash >> /etc/shells'
# Change to the new shell
chsh -s /usr/local/bin/bash
Automatically deletes old emails that match the specified label.
LABEL_TO_DELETE
: the label that should be have old messages deleted/server chat.freenode.net
i can prove ftt and its current rules are offering a mathematically beatable game. for every dollar scott collects in revenue he is taking on about five dollars of statistical net liability. this explains why he simply will not be able to make traders whole and it's snowballing with every account he sells. not only does he need a surge of new signups to pay existing liabilities but the attached debt to each new account is insurmountable. every account scott sells for $100 he's long term statistically losing about $500.
this is the largest negative house edge and the biggest blunder i've seen a company make. the math doesn't work. he will not be able to sustain this and i fear it will end up in a netflix documentary and civil or criminal judgments against scott.
the gist is, with the current rules of making 5% before losing 5% with an end of day trailing drawdown from equity highs, and with the 20% consistency rule, anyone with an equal distant target and stop and 50%