Skip to content

Instantly share code, notes, and snippets.

View michaelcolenso's full-sized avatar

michael colenso michaelcolenso

View GitHub Profile
@michaelcolenso
michaelcolenso / grab-commons-images-sh
Created January 19, 2023 05:21 — forked from loleg/grab-commons-images-sh
Download images and metadata from a Wikimedia Commons category or results page
#!/bin/bash
#
# Download images from a Wikimedia Commons category
#
# Highest preview resolution and metadata in XML format will be saved in subfolders.
# Usage: execute this script on a Linux command line, providing the full URL to the category page.
#
# Shell tools required for this script: wget sed grep
#
@michaelcolenso
michaelcolenso / wget.sh
Created June 11, 2020 22:49 — forked from Dammmien/wget.sh
wget cheat sheet
# POST a JSON file and redirect output to stdout
wget -q -O - --header="Content-Type:application/json" --post-file=foo.json http://127.0.0.1
# Download a complete website
wget -m -r -linf -k -p -q -E -e robots=off http://127.0.0.1
# But it may be sufficient
wget -mpk http://127.0.0.1
# Download all images of a website
#PeriscopeProfileJson.sh
#Returns User Profile Json from Web Profile
#Version 1.0: Initial Release
#Version 1.1: Fixed quoting characters, optimize perl statements
#Version 1.2: Update parsing for changes in profile page
#replace myuser with the user you want to query
#line breaks added for readability
USR=myuser; curl -sq https://www.periscope.tv/$USR \
@michaelcolenso
michaelcolenso / README.md
Created January 11, 2015 01:55 — forked from mbostock/.block
screen recording to gif
  1. If you haven’t already: brew install ffmpeg gifsicle imagemagick.
  2. Open QuickTime Player.
  3. File > New Screen Recording.
  4. Record.
  5. Save as recording.mov.
  6. mkdir frames
  7. ffmpeg -i recording.mov -r 24 recording-%03d.png
  8. convert recording-001.png palette.gif
  9. convert -dither none -remap palette.gif recording-*.png recording-uncompressed.gif
  10. gifsicle --optimize=3 --delay=4 < recording-uncompressed.gif > recording.gif
http {
proxy_cache_path /var/cache/nginx levels=1:2 keys_zone=one:8m max_size=3000m inactive=600m;
proxy_temp_path /var/tmp;
include mime.types;
default_type application/octet-stream;
sendfile on;
keepalive_timeout 65;
gzip on;
gzip_comp_level 6;

OS X Screencast to animated GIF

This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.

Screencapture GIF

Instructions

To capture the video (filesize: 19MB), using the free "QuickTime Player" application:

curl -Lo- http://bit.ly/janus-bootstrap | bash
#errored out...had to install git first, derrr
sudo apt-get install git
curl -Lo- http://bit.ly/janus-bootstrap | bash
# error! had to install rake next
sudo apt-get install rake
curl -Lo- http://bit.ly/janus-bootstrap | bash
@michaelcolenso
michaelcolenso / ..bashrc
Last active December 24, 2015 05:09 — forked from SlexAxton/.zshrc
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

Contract Killer 3

Revised date: 07/11/2012

Between us [company name] and you [customer name]

Summary:

We’ll always do our best to fulfil your needs and meet your expectations, but it’s important to have things written down so that we both know what’s what, who should do what and when, and what will happen if something goes wrong. In this contract you won’t find any complicated legal terms or long passages of unreadable text. We’ve no desire to trick you into signing something that you might later regret. What we do want is what’s best for both parties, now and in the future.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.