Skip to content

Instantly share code, notes, and snippets.

@mojavelinux
mojavelinux / atom-fedora-20.adoc
Last active September 26, 2022 18:21
Instructions for building and launching the Atom text editor on Fedora 20.

Using Atom on Fedora 20

This guide walks you through the steps of building and launching the Atom text editor on Fedora 20.

Building Atom

  1. Install prerequisite packages

@zachinglis
zachinglis / gist:9831849
Last active August 29, 2015 13:57
console.loge
window.console.loge = function(msg) {
var gifs = [
'http://d1e3ezyatlol8u.cloudfront.net/img/212/doge-wink-212.gif',
'http://d1e3ezyatlol8u.cloudfront.net/img/212/doge-shake-space-212.gif',
'http://d1e3ezyatlol8u.cloudfront.net/img/212/doge-peepers-212.gif',
'http://d1e3ezyatlol8u.cloudfront.net/img/212/doge-prizza-212.gif',
'http://d1e3ezyatlol8u.cloudfront.net/img/212/doge-hat-212.gif',
'http://d1e3ezyatlol8u.cloudfront.net/img/212/doge-gradient-212.gif',
'http://d1e3ezyatlol8u.cloudfront.net/img/212/doge-fat-212.gif',
'http://d1e3ezyatlol8u.cloudfront.net/img/212/doge-rainbow-212.gif',
@JedWatson
JedWatson / KeystoneApiExample.md
Last active July 26, 2021 11:29
Example of how to scaffold API endpoints for Posts in a Keystone project (based on the yo keystone example).

This is an example of how to scaffold API endpoints to list / get / create / update / delete Posts in a Keystone website.

It's a modification of the default project created with the yo keystone generator (see https://github.com/JedWatson/generator-keystone)

Gists don't let you specify full paths, so in the project structure the files would be:

routes-index.js        -->    /routes/index.js         // modified to add the api endpoints
routes-api-posts.js    -->    /routes/api/posts.js     // new file containing the Post API route controllers
@tskaggs
tskaggs / OSX-Convert-MOV-GIF.md
Last active October 9, 2023 12:15
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

@rglover
rglover / gp-specials-board.css
Created August 8, 2012 01:11
Google Prettify - Specials Board CSS Theme
.prettyprint .str, code .str { color: #a9758c; } /* string */
.prettyprint .kwd, code .kwd { color: #d58840; } /* keyword */
.prettyprint .com, code .com { color: #767979; font-style: italic; } /* comment */
.prettyprint .typ, code .typ { color: #80aac6; } /* type */
.prettyprint .lit, code .lit { color: #ac758c; } /* literal */
.prettyprint .pun, code .pun { color: #fff; } /* punctuation */
.prettyprint .pln, code .pln { color: #fff; } /* plaintext */
.prettyprint .tag, code .tag { color: #fecf84; } /* html/xml tag */
.prettyprint .atn, code .atn { color: #ce8a45; } /* html/xml attribute name */
.prettyprint .atv, code .atv { color: #b2c869; } /* html/xml attribute value */
@tracend
tracend / handlebars.localisation.js
Last active October 16, 2018 18:11
Handlebars Localisation Helper #cc
// Handlebars Localisation Helper
// Source: https://gist.github.com/tracend/3261055
Handlebars.registerHelper('l10n', function(keyword) {
var lang = (navigator.language) ? navigator.language : navigator.userLanguage;
// pick the right dictionary (if only one available assume it's the right one...)
var locale = window.locale[lang] || window.locale['en-US'] || window.locale || false;
// exit now if there's no data
if( !locale ) return target;
@kitek
kitek / gist:1579117
Created January 8, 2012 17:50
NodeJS create md5 hash from string
var data = "do shash'owania";
var crypto = require('crypto');
crypto.createHash('md5').update(data).digest("hex");
@connor
connor / keysocket-rdio.js
Created January 1, 2012 23:55
Add keyboard shortcut to Rdio's web app
// goes with Boris Smus's keysocket extension <https://github.com/borismus/keysocket/>
var PREV = 20;
var PLAY = 16;
var NEXT = 19;
var fake_prev_el = document.createElement('div');
fake_prev_el.id = "fake_prev_el";
fake_prev_el.style.height = 0;
fake_prev_el.style.width = 0;
@jdennes
jdennes / LICENSE
Last active March 7, 2024 04:40
Subscribing to a Campaign Monitor list using AJAX
The MIT License (MIT)
Copyright (c) James Dennes
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions: