Skip to content

Instantly share code, notes, and snippets.

@nuchi
nuchi / green_links_on_google.txt
Last active January 26, 2020 07:30
Restore green links and no favicons on Google with uBlock Origin
@pmhoudry
pmhoudry / trixUpload.js
Last active May 7, 2021 16:37
Trix upload button in VanillaJs
(function() {
// Adding upload button to Trix toolbar on initialization
document.addEventListener('trix-initialize', function(e) {
trix = e.target;
toolBar = trix.toolbarElement;
// Creation of the button
button = document.createElement("button");
button.setAttribute("type", "button");
button.setAttribute("class", "attach");
@henrik
henrik / ID3 Track Numbers from Filename Prefixes.scpt
Created March 1, 2014 17:20
A new home for an old AppleScript.
(*
"ID3 track numbers from filename prefixes" for iTunes
By Henrik Nyh, http://henrik.nyh.se, 2007-01-14.
Based on "Filenames to Song Names" by Doug Adams.
*)
tell application "iTunes"
if kind of container of view of front window is not library or selection of front browser window is {} then
display dialog "Select some tracks in iTunes first." buttons {"Cancel"} default button 1 with icon 2 giving up after 15
@lelandbatey
lelandbatey / whiteboardCleaner.md
Last active April 25, 2024 02:01
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

@17twenty
17twenty / simple_git.md
Created September 27, 2013 18:32
A Simple Git branching model

a simple git branching model

This is a very simple git workflow. It (and variants) is in use by many people. I settled on it after using it very effectively at Athena. GitHub does something similar; Zach Holman mentioned it in this talk.

The gist

@tskaggs
tskaggs / OSX-Convert-MOV-GIF.md
Last active May 6, 2024 13:07
Creating GIFs from .MOV files in OSX using FFmpeg and ImageMagick

Convert MOV to GIF using FFmpeg and ImageMagick

I tried a few different techniques to make a GIF via command-line and the following gives me the best control of quality and size. Once you're all setup, you'll be pumping out GIFs in no time!

Preparation

Install FFmpeg

  • $ brew install ffmpeg [all your options]
    • Example: $ brew install ffmpeg --with-fdk-aac --with-ffplay --with-freetype --with-frei0r --with-libass --with-libvo-aacenc --with-libvorbis --with-libvpx --with-opencore-amr --with-openjpeg --with-opus --with-rtmpdump --with-schroedinger --with-speex --with-theora --with-tools

Install ImageMagick

@stefanschmidt
stefanschmidt / silence-dropbox.sh
Created August 27, 2013 10:37
Stop Dropbox from asking for admin password after installation to ~/Applications
chmod 0000 ~/Applications/Dropbox.app/Contents/Resources/*.tgz
@mtowers
mtowers / README.md
Last active February 24, 2022 17:19
Google Analytics Website Visitor Count Widget for Dashing with OAuth2 Authentication
@rjsamson
rjsamson / Rakefile
Created May 27, 2013 01:50
Example Rubymotion menubar app
# -*- coding: utf-8 -*-
$:.unshift("/Library/RubyMotion/lib")
require 'motion/project/template/osx'
Motion::Project::App.setup do |app|
# Use `rake config' to see complete project settings.
app.name = 'MenubarApp'
app.info_plist['NSUIElement'] = 1
end
@azone
azone / open-in-blank.js
Created January 13, 2013 11:33
Open Octopress external link in new tab
function addBlankTargetForLinks () {
$('a[href^="http"]').each(function(){
$(this).attr('target', '_blank');
});
}
$(document).bind('DOMNodeInserted', function(event) {
addBlankTargetForLinks();
});