Skip to content

Instantly share code, notes, and snippets.

View ginader's full-sized avatar

Dirk Ginader ginader

View GitHub Profile
@lelandbatey
lelandbatey / whiteboardCleaner.md
Last active April 10, 2025 09:21
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

@remy
remy / easy-list.md
Last active January 4, 2016 06:19
Markdown pro tip: long numbered list made easier
  1. One
  • Two
  • Three
  • Four
  • Five

But really easy to re-sort because the items aren't really numbered:

1. one
@danharper
danharper / background.js
Last active April 29, 2025 04:09
Bare minimum Chrome extension to inject a JS file into the given page when you click on the browser action icon. The script then inserts a new div into the DOM.
// this is the background code...
// listen for our browerAction to be clicked
chrome.browserAction.onClicked.addListener(function (tab) {
// for the current tab, inject the "inject.js" file & execute it
chrome.tabs.executeScript(tab.ib, {
file: 'inject.js'
});
});
@lifedraft
lifedraft / gist:7655319
Last active December 29, 2015 10:09
Debouncing Window Scroll events with requestAnimationFrame #jquery. Source: http://www.html5rocks.com/en/tutorials/speed/animations/
jQuery.request_scroll = (callback) ->
###
Callback for our scroll event - just
keeps a track on the last scroll value
###
onScroll = ->
lastScrollY = window.scrollY
requestTick()
// DISCLAIMER: This is not necessarily good code. It’s just code that I wrote
// as quickly as possible to do each task.
// 1
return 2*i;
// 2
return !(i%2);
@chriseppstein
chriseppstein / output.css
Last active December 24, 2015 22:09
Debug mode for browser support in compass 0.13
/* Capability css-animation is prefixed with -moz because omitting it would affect 1.03559% of users and the threshold is 0.1%. */
@-moz-keyframes foo {
0% {
/* Content for ie 8 omitted.
Not allowed in the current scope: The ie 8 is incompatible with -moz. */
opacity: 0; }
100% {
/* Content for ie 8 omitted.
Not allowed in the current scope: The ie 8 is incompatible with -moz. */
@dypsilon
dypsilon / frontendDevlopmentBookmarks.md
Last active May 5, 2025 13:05
A badass list of frontend development resources I collected over time.
@paulirish
paulirish / gist:5558557
Last active February 26, 2025 18:07
a brief history of detecting local storage

A timeline of the last four years of detecting good old window.localStorage.


Jan Lenhart, bless his heart contributed the first patch for support:

October 2009: 5059daa

@bkastl
bkastl / comparison
Last active December 17, 2015 04:49
JPEG Encoder comparison (lena 56KB filesize goal)
Original file:
Lena.png 512 x 512 Pixel 24 bit Color 386.301 Byte
The standard for image compression tests.
Might be highly optimized in some encoders.
Goal: Get the most quality out of around 56KB.
Look at http://benediktkastl.de/summary_lena.htm for the images.
Metrics explained:
@dergachev
dergachev / GIF-Screencast-OSX.md
Last active April 28, 2025 00:02
OS X Screencast to animated GIF

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: