Skip to content

Instantly share code, notes, and snippets.

View brianherbert's full-sized avatar
🎯
Focusing

Brian Herbert brianherbert

🎯
Focusing
View GitHub Profile
@alexellis
alexellis / timelapse.md
Created March 9, 2017 08:48 — forked from porjo/timelapse.md
ffmpeg time-lapse

Convert sequence of JPEG images to MP4 video

ffmpeg -r 24 -pattern_type glob -i '*.JPG' -i DSC_%04d.JPG -s hd1080 -vcodec libx264 timelapse.mp4

  • -r 24 - output frame rate
  • -pattern_type glob -i '*.JPG' - all JPG files in the current directory
  • -i DSC_%04d.JPG - e.g. DSC_0397.JPG
  • -s hd1080 - 1920x1080 resolution

Slower, better quality

@itod
itod / split_keyboards.md
Last active June 12, 2024 12:08
Every "split" mechanical keyboard currently being sold that I know of
@shadowhand
shadowhand / git-switchbranch
Last active August 29, 2015 13:57
Fast git branch switching (git-switchbranch)
#!/bin/bash
######################################################################################
# THIS GIST IS NO LONGER MAINTAINED AND MAY BE DELETED IN THE FUTURE! #
# PLEASE GO TO https://github.com/shadowhand/git-switchbranch FOR A CURRENT VERSION! #
######################################################################################
# git-switchbranch
# @link https://gist.github.com/shadowhand/9813453
# @author shadowhand https://github.com/shadowhand
@shadowhand
shadowhand / git_extdeps.sh
Last active August 29, 2015 13:56
Search for external static deps using git grep
# Git grep for external static deps (ignores static:: and self:: calls)
alias staticdeps="git grep -Pi '^(?!\s+[*\/]).+\b[a-z][a-z0-9_]++(?<!static|self)::'"
# can also be assigned as a git alias
# add --global if you want it everywhere
git config alias.extdeps "grep -Pi '^(?"'!'"\s+[*\/]).+\\b[a-z][a-z0-9_]++(?<"'!'"static|self)::'"
# usage, global search
git extdeps
@lelandbatey
lelandbatey / whiteboardCleaner.md
Last active June 16, 2024 13:44
Whiteboard Picture Cleaner - Shell one-liner/script to clean up and beautify photos of whiteboards!

Description

This simple script will take a picture of a whiteboard and use parts of the ImageMagick library with sane defaults to clean it up tremendously.

The script is here:

#!/bin/bash
convert "$1" -morphology Convolve DoG:15,100,0 -negate -normalize -blur 0x1 -channel RBG -level 60%,91%,0.1 "$2"

Results

@willurd
willurd / web-servers.md
Last active September 21, 2024 09:18
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000
// the location we want to GeoCode
var location = 'London';
// we are using MapQuest's Nominatim service
var geocode = 'http://open.mapquestapi.com/search?format=json&q=' + location;
// use jQuery to call the API and get the JSON results
$.getJSON(geocode, function(data) {
// get lat + lon from first match
var latlng = [data[0].lat, data[0].lon]
@marktheunissen
marktheunissen / pedantically_commented_playbook.yml
Last active August 26, 2024 11:06 — forked from phred/pedantically_commented_playbook.yml
Insanely complete Ansible playbook, showing off all the options
This playbook has been removed as it is now very outdated.
@comp615
comp615 / leaflet_numbered_markers.css
Created April 2, 2012 23:51
Numbered Markers in Leaflet (JS Mapping)
.leaflet-div-icon {
background: transparent;
border: none;
}
.leaflet-marker-icon .number{
position: relative;
top: -37px;
font-size: 12px;
width: 25px;
@crofty
crofty / index.html
Last active October 22, 2021 08:24
A example of using Google Map tiles with the Leaflet mapping library - http://matchingnotes.com/using-google-map-tiles-with-leaflet
<!DOCTYPE html>
<html>
<head>
<title>Leaflet</title>
<link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.3.1/leaflet.css" />
<script src="http://cdn.leafletjs.com/leaflet-0.3.1/leaflet.js"></script>
<script src="http://maps.google.com/maps/api/js?v=3.2&sensor=false"></script>
<script src="http://matchingnotes.com/javascripts/leaflet-google.js"></script>
</head>
<body>