Skip to content

Instantly share code, notes, and snippets.

View corypina's full-sized avatar

Cory Piña corypina

View GitHub Profile
// Includes functions for exporting active sheet or all sheets as JSON object (also Python object syntax compatible).
// Tweak the makePrettyJSON_ function to customize what kind of JSON to export.
var FORMAT_ONELINE = 'One-line';
var FORMAT_MULTILINE = 'Multi-line';
var FORMAT_PRETTY = 'Pretty';
var LANGUAGE_JS = 'JavaScript';
var LANGUAGE_PYTHON = 'Python';
@corypina
corypina / textexpander-gist-retrieval.txt
Last active February 7, 2019 20:07
TextExpander Snippet to retrieve Gist
#!/usr/bin/php
<?php
// What is the URI of the Gist? Make sure you've provided a path to the "raw" Gist.
$GistURI = 'http://...';
// Select "Shell Script" from TextExpander content type!
print file_get_contents($GistURI);
@corypina
corypina / beaver-default.php
Created November 15, 2018 06:12 — forked from JeremyEnglert/beaver.php
Set BeaverBuilder as Default Editor
<?php
// Sets Beaver Builder as the default editor.
function make_beaver_builder_default( $post_ID, $post, $update ) {
if ( ! $update ) {
update_post_meta( $post_ID, '_fl_builder_enabled', true );
}
}
add_action( 'wp_insert_post', 'make_beaver_builder_default', 10, 3 );
@corypina
corypina / 0_reuse_code.js
Created December 18, 2015 17:26
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console