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:
| # credits: https://superuser.com/questions/686317/how-to-fully-uninstall-the-cocoapods-from-the-mac-machine | |
| # remove gems | |
| for i in $( gem list --local --no-version | grep cocoapods ); | |
| do | |
| gem uninstall $i; | |
| done | |
| # Additionally delete ~/.cocoapods to remove the cache of podspecs. |
| #!/bin/bash | |
| # mail syntax: mail -s "any mail subject string" any@mail.com | |
| # or: mail "any mail subject string" any@mail.com | |
| if [ $1 == "-s" ] | |
| then | |
| subject=$2 | |
| recip=$3 | |
| else | |
| subject=$1 | |
| recip=$2 |
| #!/bin/sh | |
| HP_IPT='/sbin/iptables' | |
| HP_Port=23 | |
| HP_Time=600 | |
| $HP_IPT -N honeypot | |
| $HP_IPT -A INPUT ! -s 127.0.0.1 -j honeypot | |
| $HP_IPT -A honeypot -m recent --update --seconds $HP_Time --name portscan -j DROP | |
| $HP_IPT -A honeypot -p tcp -m tcp --dport $HP_Port -m recent --name portscan --set -j LOG --log-prefix "IPTABLES -- HONEYPOT -- P $HP_Port " --log-level 6 --log-ip-options | |
| $HP_IPT -A honeypot -p tcp -m tcp --dport $HP_Port -m recent --name portscan --set -j DROP | |
| $HP_IPT -A honeypot -j RETURN |
| var fs = require('fs'); | |
| //npm install @types/node @types/es6-promise | |
| function loadFromJson(filename: string) { | |
| //TODO: read files async with Promises | |
| } | |
| var files: string[] = [ | |
| "good.json", "absent.json", "good2.json", "invalid.json", "good3.json" | |
| ]; |
| var request = require('request'); | |
| var reverseGeocode = function(locationName, callback) { | |
| request({ | |
| uri: "http://nominatim.openstreetmap.org/search?format=json&q="+locationName, | |
| json: true | |
| }, function(err, response, body) { | |
| if (err) { return callback(err, null); } | |
| else { | |
| if (body && body.length) { |
| { | |
| "name": "3_tsconfig", | |
| "version": "1.0.0", | |
| "description": "", | |
| "main": "old.js", | |
| "scripts": { | |
| "demo": "tsc && node build/js/reverseGeo.js 'Stuttgart, Germany'" | |
| }, | |
| "author": "", | |
| "license": "Apache-2.0", |
| # helper bash script to open multiple chrome windows at given position and size | |
| # works at mac os x sierra | |
| open -n -g -a /Applications/Google\ Chrome\ Canary.app --args --new-window --app="data:text/html,<html><body><script>window.resizeTo(500,1000);window.moveTo(1200,50);window.location='http://localhost:8000/server/';</script></body></html>" | |
| open -n -g -a /Applications/Google\ Chrome\ Canary.app --args --new-window --app="data:text/html,<html><body><script>window.resizeTo(1100,300);window.moveTo(70,50);window.location='http://localhost:8000/';</script></body></html>" | |
| open -n -g -a /Applications/Google\ Chrome\ Canary.app --args --new-window --app="data:text/html,<html><body><script>window.resizeTo(1100,300);window.moveTo(70,350);window.location='http://localhost:8000/';</script></body></html>" | |
| open -n -g -a /Applications/Google\ Chrome\ Canary.app --args --new-window --app="data:text/html,<html><body><script>window.resizeTo(1100,300);window.moveTo(70,650);window.location='http://localhost:8000/';</script>< |
| <html> | |
| <head> | |
| <meta charset="utf-8"> | |
| <meta http-equiv="X-UA-Compatible" content="chrome=1"> | |
| <meta name="viewport" content="width=device-width,initial-scale=1.0"> | |
| <link rel="stylesheet" type="text/css" media="screen" href="v2.css"> | |
| <link rel="stylesheet" type="text/css" media="screen" href="stylesheet.css"> | |
| <title>Cordova Features</title> |
A simple bookmarklet which makes our painful life a bit easier.
javascript:(function(b,a,c,d,e){if(/\.\w+$/.test(a))b.location=c+a.replace("/blob/","/");else if(e=prompt("Insert a filename:","index.html"))b.location=c+a.replace("/tree/","/")+(~a.indexOf(d)?"/":d)+e})(window,location.pathname,"http://rawgit.com","/master/");The usage is quite simple:
Go to any repo where you like to preview a file, and execute the booklet. If the current url is a file, it should open the file directly, otherwise it will prompt for a filename (per default it is index.html).