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:
# Apache config to allow access to webfonts from all domains: | |
<IfModule mod_headers.c> | |
<FilesMatch "\.(eot|otf|tt[cf]|woff)$"> | |
Header set Access-Control-Allow-Origin "*" | |
</FilesMatch> | |
</IfModule> |
#!/bin/bash | |
cd c:/vagrant/Homestead | |
vagrant up | |
while true; do | |
read -p "Do you want to quit yet?" yn | |
case $yn in | |
[Yy]* ) vagrant halt; break;; | |
* ) echo "Okay then. Waiting for (y)es...";; |
<?php | |
/** | |
* @param array $A | |
* @return int | |
*/ | |
function solution(array $A) | |
{ | |
$left = $A[0]; | |
$right = array_sum($A) - $left; |
@include('Core::partials.viewmodelmessages') | |
<div class="form-horizontal"> | |
<fieldset> | |
<legend>Contractor Company Details</legend> | |
@include('Core::components.textinput',['label' => 'Company Name', 'name' => 'company_name']) | |
@include('Core::components.textinput',['label' => 'Registration No.', 'name' => 'reg_no']) | |
@include('Core::components.textinput',['label' => 'Vat Reg.', 'name' => 'vat_reg']) | |
</fieldset> |
<?php | |
/** | |
* BITWISE FLAGS for Custom PHP Objects | |
* | |
* @link http://php.net/manual/en/language.operators.bitwise.php#108679 | |
* | |
* Sometimes I need a custom PHP Object that holds several boolean TRUE or FALSE values. | |
* I could easily include a variable for each of them, but as always, code has a way to | |
* get unweildy pretty fast. A more intelligent approach always seems to be the answer, |
[ | |
"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" |
# | |
## Source a .aliases file: | |
# if [ -f ~/.zsh/zshalias ]; then | |
# source ~/.aliases | |
# else | |
# print "404: ~/.aliases not found." | |
# fi | |
# | |
# Beautiful git log |
<?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 |