Skip to content

Instantly share code, notes, and snippets.

View cr0ybot's full-sized avatar
🤖

Cory Hughart cr0ybot

🤖
View GitHub Profile
@cr0ybot
cr0ybot / mobilefix.js
Created March 30, 2019 17:07
Mobile 100vh fix (ES6 module)
/**
* MobileFix
*
* Fix fullheight elements on mobile with that pesky URL bar
*/
/**
* Threshold of screen height difference at which elements will update their
* height, so will essentially only update on orientation change.
* Change to 0 if you want elements to adjust every time URL bar moves
@cr0ybot
cr0ybot / sunrise.php
Last active December 11, 2023 16:27
WordPress Multisite Local/Staging/Live Dev Setup
<?php
/**
* File wp-content/sunrise.php
*
* This allows us to copy the production multisite database to staging/local and still use
* it directly without altering domains
*
* This file can be present on all copies of the site, but it should only be added to the
* wp-config file of local/staging (via `define( 'SUNRISE', true )`)
*
@cr0ybot
cr0ybot / config.js
Created May 11, 2018 15:56
Parse JS SDK modifications for Titanium SDK
{
"global": {
"parse": {
"applicationId": "com.example.parseAppID",
"javascriptKey": "XXXX",
"clientKey": "YYYY",
"restAPIKey": "ZZZZ",
"serverURL": "https://example.com/parse/"
}
}
@cr0ybot
cr0ybot / functions.php
Created August 30, 2017 13:51
Add style formats to WordPress editor dropdown
function my_mce_before_init_insert_formats( $init_array ) {
$style_formats = array(
array(
'title' => 'Headline',
'block' => 'h2',
'classes' => 'headline',
'wrapper' => false,
),
array(
'title' => 'Blockquote',
@cr0ybot
cr0ybot / Gruntfile.js
Last active August 29, 2015 14:23 — forked from jshawl/Gruntfile.js
module.exports = function(grunt) {
require('load-grunt-tasks')(grunt);
require('grunt-postcss')(grunt);
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
sass: {
options: {
sourceMap: false
@cr0ybot
cr0ybot / config.rb
Last active August 29, 2015 14:06 — forked from nathansmith/config.rb
preferred_syntax = :scss
http_path = '/'
css_dir = 'css'
sass_dir = 'scss'
images_dir = 'img'
javascripts_dir = 'js'
fonts_dir = 'fonts'
relative_assets = true