Skip to content

Instantly share code, notes, and snippets.


Jake Bellacera jakebellacera

View GitHub Profile
JohnAlbin /
Last active Nov 16, 2020 — forked from clarkdave/createPages.ts
TypeScript + Gatsby config and node API


  1. When Gatsby starts up, it will read gatsby-config.js first.
  2. As you can see below, we use that file to require('ts-node').register() which registers a TypeScript evaluator that will be used when Gatsby reads all other API Javascript files. In other words, we only need to do this once in our entire codebase and not in other Gatsby files like gatsby-node.js.
  3. Our gatsby-config.js re-exports all the exported variables available in gatsby-config.ts.
jtsternberg / cmb-select-with-optgroups.php
Last active Nov 15, 2017
CMB2 select field options overridden with a filter and using optgroups
View cmb-select-with-optgroups.php
function cmb_opt_groups( $args, $defaults, $field_object, $field_types_object ) {
// Only do this for the field we want (vs all select fields)
if ( '_cmb_option_field' != $field_types_object->_id() ) {
return $args;
$option_array = array(
'Group 1' => array(
octocat / .gitignore
Created Feb 27, 2014
Some common .gitignore configurations
View .gitignore
# Compiled source #
# Packages #
chengyin / linkedout.js
Last active Oct 2, 2020
Unsubscribe all LinkedIn email in "one click". For an easier to use version, you can check out the bookmarklet:
View linkedout.js
// 1. Go to page
// 2. You may need to login
// 3. Open JS console
// ([How to?](
// 4. Copy the following code in and execute
// 5. No more emails
// Bookmarklet version:
dergachev /
Last active Nov 28, 2020
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


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

jakebellacera /
Created Oct 13, 2012
A paginator plugin built with Prototype.js -

NOTE: This code now has it's own repo! Visit:


A lightweight paginator script. It currently uses Prototype.js, but will be framework-agnostic in future releases.


danro / Custom.css
Created Sep 16, 2012
Improved webkit inspector toolbar
View Custom.css
#-webkit-web-inspector #toolbar {
background: #cdcdcd !important;
height: 36px !important;
#-webkit-web-inspector #main {
top: 36px !important;
#-webkit-web-inspector .toolbar-item.elements:hover:after {
content: "elements";
z-index: 9999;
jakebellacera /
Created Aug 22, 2012
Instructions on how to use MAMP with the mysql2 gem and Ruby 1.9.3-p194 via rbenv

How to use MAMP with the mysql2 gem and Ruby 1.9.3-p194 via rbenv

Let's say you're a web developer who happens to work with both MAMP and Ruby when building different types of websites. Let's say you also like to keep your MySQL stuff in one place and don't like having to juggle both a local MySQL install as well as a MAMP MySQL install. Well, you can indeed connect your ruby apps to MAMP's MySQL. Here's a tutorial on how to do it.

Important! Before you do anything, download and install MAMP. MAMP Pro will work as well. At the time of this writing, MAMP 2.1.1 is the latest.

First, install Ruby via rbenv

  1. Install homebrew
  2. Install rbenv: brew install rbenv, follow any instructions homebrew gives you after the installation is complete.
peter /
Created Jun 30, 2012
Creating and Deploying an EdgeRails (Rails 4) Application to Heroku
# 0. Make sure you have Ruby 1.9.3 installed, and optionally RVM and PostgreSQL
# 0.2 If you are on the Mac, make sure you have a c compiler by installing XCode Command Line Tools or gcc4.2 with homebrew
# 0.5 Make sure you have bundler version ~> 1.2 as Rails depends on it
gem install bundler
# 1. Get edge Rails source (master branch)
git clone
View tmux-cheatsheet.markdown

tmux shortcuts & cheatsheet

start new:


start new with session name:

tmux new -s myname
You can’t perform that action at this time.