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:
#!/bin/bash | |
echo "Restarting bluetooth service..." | |
blueutil -p 0 && sleep 1 && blueutil -p 1 | |
echo "Waiting bluetooth service to be restored..." | |
until blueutil -p | grep "1" >/dev/null; do sleep 1; done | |
echo "Searching for devices not connected..." | |
devices=($(blueutil --paired | grep "not connected" | awk -F '[ ,]' '{print $2}')) |
[{ "team": "Boston Celtics" },{ "team": "Dallas Mavericks" },{ "team": "Brooklyn Nets" },{ "team": "Houston Rockets" },{ "team": "New York Knicks" },{ "team": "Memphis Grizzlies" },{ "team": "Philadelphia 76ers" },{ "team": "New Orleans Hornets" },{ "team": "Toronto Raptors" },{ "team": "San Antonio Spurs" },{ "team": "Chicago Bulls" },{ "team": "Denver Nuggets" },{ "team": "Cleveland Cavaliers" },{ "team": "Minnesota Timberwolves" },{ "team": "Detroit Pistons" },{ "team": "Portland Trail Blazers" },{ "team": "Indiana Pacers" },{ "team": "Oklahoma City Thunder" },{ "team": "Milwaukee Bucks" },{ "team": "Utah Jazz" },{ "team": "Atlanta Hawks" },{ "team": "Golden State Warriors" },{ "team": "Charlotte Bobcats" },{ "team": "Los Angeles Clippers" },{ "team": "Miami Heat" },{ "team": "Los Angeles Lakers" },{ "team": "Orlando Magic" },{ "team": "Phoenix Suns" },{ "team": "Washington Wizards" },{ "team": "Sacramento Kings" }] |
require 'uri' | |
require 'net/http' | |
require 'net/https' | |
zpl = ARGF.read | |
uri = URI.parse( 'http://api.labelary.com/v1/printers/8dpmm/labels/4x6/0/' ) | |
https = Net::HTTP.new(uri.host,uri.port) | |
https.use_ssl = false | |
req = Net::HTTP::Post.new(uri.path, initheader = {'Accept' =>'image/png'}) |
// ==UserScript== | |
// @name Add Ability to Download Log as File from NetSuite Debugger | |
// @namespace https://debugger.netsuite.com | |
// @version 0.1 | |
// @description This script adds a | |
// @author S. Wilson. | |
// @match https://debugger.netsuite.com/app/common/scripting/scriptdebugger.nl?* | |
// @grant none | |
// ==/UserScript== |
// ==UserScript== | |
// @name Add Local Files to NetSuite SuiteScript Debugger | |
// @namespace https://debugger.netsuite.com | |
// @version 0.1 | |
// @description This script adds a file input in the command toolbar of NetSuite's script debugger. You can then add a local file to the text area to debug | |
// @author S. Wilson. | |
// @match https://debugger.netsuite.com/app/common/scripting/scriptdebugger.nl?* | |
// @grant none | |
// ==/UserScript== |
# From : https://gorails.com/setup/ubuntu/14.04 | |
# and | |
# https://www.digitalocean.com/community/tutorials/how-to-deploy-sinatra-based-ruby-web-applications-on-ubuntu-13 | |
# and parts from | |
# https://www.digitalocean.com/community/tutorials/how-to-install-ruby-2-1-0-and-sinatra-on-ubuntu-13-with-rvm | |
sudo apt-get update | |
sudo apt-get install git-core curl zlib1g-dev build-essential libssl-dev libreadline-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt1-dev libcurl4-openssl-dev python-software-properties libffi-dev | |
sudo apt-get install ruby |
## | |
## This nginx.conf servers as the main config file for webflow reverse proxy | |
## | |
## RCS: | |
## https://gist.github.com/sansmischevia/5617402 | |
## | |
## Hardening tips: | |
## http://www.cyberciti.biz/tips/linux-unix-bsd-nginx-webserver-security.html | |
## |
Perl and PHP Regular Expressions | |
PHP regexes are based on the PCRE (Perl-Compatible Regular Expressions), so any regexp that works for one should be compatible with the other or any other language that makes use of the PCRE format. Here are some commonly needed regular expressions for both PHP and Perl. Each regex will be in string format and will include delimiters. | |
All Major Credit Cards | |
This regular expression will validate all major credit cards: American Express (Amex), Discover, Mastercard, and Visa. | |
//All major credit cards regex | |
'/^(?:4[0-9]{12}(?:[0-9]{3})?|5[1-5][0-9]{14}|6011[0-9]{12}|622((12[6-9]|1[3-9][0-9])|([2-8][0-9][0-9])|(9(([0-1][0-9])|(2[0-5]))))[0-9]{10}|64[4-9][0-9]{13}|65[0-9]{14}|3(?:0[0-5]|[68][0-9])[0-9]{11}|3[47][0-9]{13})*$/' |
/** | |
* CTCCartFillout.js | |
* | |
* This little bookmarklet populates the new app builder with default values | |
* | |
* MIT Licensed. | |
* | |
* Copyright 2011-2012 Seth Wilson @SethWilson | |
* | |
* ------------------------------------------------ |