Skip to content

Instantly share code, notes, and snippets.

View Chrisedmo's full-sized avatar

Chris Mousdale Chrisedmo

View GitHub Profile
@Chrisedmo
Chrisedmo / sublime-icloud.txt
Created November 11, 2014 13:53
Sync Sublime Text Plugins iCloud Drive
Sublime Text Plugins iCloud Drive
First Machine
On your first machine, use the following instructions.
$ cd ~/Library/Application\ Support/Sublime\ Text\ 2/Packages/
$ mkdir ~/Library/Mobile\ Documents/com\~apple\~CloudDocs/Web\ Dev/Plugins
$ mv User ~/Library/Mobile\ Documents/com\~apple\~CloudDocs/Web\ Dev/Plugins
$ ln -s ~/Library/Mobile\ Documents/com\~apple\~CloudDocs/Web\ Dev/Plugins/User
@Chrisedmo
Chrisedmo / WP-simple-slick-slider.php
Last active August 29, 2015 14:13
Wordpress: Simple optionTree + Slick gallery
<div class="image-banner">
<?php $banner_slider = get_post_meta( $post->ID, 'tpa_banner_slider', true ); ?>
<?php if (!empty($banner_slider)): ?>
<?php $banner_slider = explode(",",$banner_slider);
foreach ($banner_slider as $imageID) :?>
<?php $image_src = wp_get_attachment_image_src($imageID, 'full'); ?>
<div>
<img src="<?php echo $image_src[0];?>"/>
@Chrisedmo
Chrisedmo / typekit.editor.php
Last active August 29, 2015 14:23 — forked from tomjn/typekit.editor.php
WP: Add Typekit JS to Render fonts in Admin
add_filter("mce_external_plugins", "tomjn_mce_external_plugins");
function tomjn_mce_external_plugins($plugin_array){
$plugin_array['typekit'] = get_template_directory_uri().'/typekit.tinymce.js';
return $plugin_array;
}
@Chrisedmo
Chrisedmo / ot_revolution_slider
Created September 2, 2015 14:14
Revolution Slider - Option Tree
/**
* Revolution Slider option type.
*
* See @ot_display_by_type to see the full list of available arguments.
*
* @param array An array of arguments.
* @return string
*
* @access public
* @since 2.0
@Chrisedmo
Chrisedmo / SassMeister-input-HTML.html
Created October 21, 2015 13:12
Generated by SassMeister.com.
<div class="">
<div class="flexible-column"><span></span></div>
<div class="flexible-column"><span></span></div>
<div class="flexible-column"><span></span></div>
<div class="flexible-column"><span></span></div>
<div class="flexible-column"><span></span></div>
<div class="flexible-column"><span></span></div>
<div class="flexible-column"><span></span></div>
</div>
@Chrisedmo
Chrisedmo / sketch-localtunnel.txt
Last active November 1, 2015 22:41 — forked from almonk/gist:1f67aad473be5166b3c0
Handy localtunnel script (For Sketch Preview).
$ npm -g install localtunnel
/usr/local/bin/lt -> /usr/local/lib/node_modules/localtunnel/bin/client
[email protected] /usr/local/lib/node_modules/localtunnel
├── [email protected]
├── [email protected]
├── [email protected]
└── [email protected] ([email protected], [email protected], [email protected], [email protected])
$ lt --port 8080
your url is: https://htkzpnysxf.localtunnel.me
/*===================================================================================
* Add global options
* =================================================================================*/
/**
*
* The page content surrounding the settings fields. Usually you use this to instruct non-techy people what to do.
*
*/
function theme_settings_page(){
@Chrisedmo
Chrisedmo / screen-size.js
Created March 10, 2016 11:47
Responsive Screen Size Checker
// Get visible window sizes
function displayWindowSize(){
var e=window.innerWidth,
t=window.innerHeight;
document.getElementById("dev").innerHTML=t+"x"+e;
}
// Create DIV
var div=document.createElement("div");
@Chrisedmo
Chrisedmo / crontab_helper
Created July 20, 2016 14:27 — forked from khalwat/crontab_helper
Never struggle with editing your crontab again; put this in the beginning of each of your crontabs
# * * * * * command to execute
# ┬ ┬ ┬ ┬ ┬
# │ │ │ │ │
# │ │ │ │ │
# │ │ │ │ └───── day of week (0 - 6) (0 to 6 are Sunday to Saturday, or use names)
# │ │ │ └────────── month (1 - 12)
# │ │ └─────────────── day of month (1 - 31)
# │ └──────────────────── hour (0 - 23)
# └───────────────────────── min (0 - 59)
@Chrisedmo
Chrisedmo / extras.sh
Last active November 15, 2016 06:13
Extra Requirements for Larval Valet + Craft 2.6
brew install php70-mcrypt
brew install php70-imagick
brew install homebrew/versions/mysql56
Then run valet restart after each.