Skip to content

Instantly share code, notes, and snippets.

View FrankM1's full-sized avatar
🎯
Focusing

Franklin Gitonga FrankM1

🎯
Focusing
View GitHub Profile
# Install brew
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
# Install composer
brew install homebrew/php/composer
### PHPCS
composer global require "squizlabs/php_codesniffer=*"
# Add to your .bash_profile
var mediaJSON = { "categories" : [ { "name" : "Movies",
"videos" : [
{ "description" : "Big Buck Bunny tells the story of a giant rabbit with a heart bigger than himself. When one sunny day three rodents rudely harass him, something snaps... and the rabbit ain't no bunny anymore! In the typical cartoon tradition he prepares the nasty rodents a comical revenge.\n\nLicensed under the Creative Commons Attribution license\nhttp://www.bigbuckbunny.org",
"sources" : [ "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4" ],
"subtitle" : "By Blender Foundation",
"thumb" : "images/BigBuckBunny.jpg",
"title" : "Big Buck Bunny"
},
{ "description" : "The first Blender Open Movie from 2006",
"sources" : [ "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ElephantsDream.mp4" ],
@FrankM1
FrankM1 / LocalValetDriver
Last active November 30, 2018 06:58
Wordpress Multisite Valet Driver
<?php
class LocalValetDriver extends WordPressValetDriver {
/**
* @var string The public web directory, if deeper under the root directory
*/
protected $public_dir = '';
/**
* Determine if the driver serves the request.
@FrankM1
FrankM1 / PHP.sublime-settings
Created August 25, 2017 06:49 — forked from joshearl/PHP.sublime-settings
To enable double-clicking to select PHP variables (including the `$` prefix), save this file as `Data/Packages/User/PHP.sublime-settings`.
{
"word_separators": "./\\()\"'-:,.;<>~!@#%^&*|+=[]{}`~?"
}
@FrankM1
FrankM1 / github.php
Created December 8, 2016 00:10 — forked from ideag/github.php
<?php
define('TOKEN_SECRET', 'plugin_token' );
define('PLUGIN_SLUG', 'plugin_slug' );
EdwinDeployer::parse();
class EdwinDeployer {
public static $json = false;
public static $repo = '';
@FrankM1
FrankM1 / edit.tools.js
Created October 8, 2016 06:51
Elementor hover intent for edit tools
var EditToolsBehavior;
EditToolsBehavior = Marionette.Behavior.extend( {
initialize: function() {
this.listenTo( builder.channels.dataEditMode, 'switch', this.onEditModeSwitched );
},
onEditModeSwitched: function() {
var activeMode = builder.channels.dataEditMode.request( 'activeMode' );
this.view.$el.removeClass( 'builder-element-tools-active', 'preview' === activeMode );
#!/bin/bash
# Add Vagrant's NFS setup commands to sudoers, for `vagrant up` without a password
# Updated to work with Vagrant 1.3.x
# Stage updated sudoers in a temporary file for syntax checking
TMP=$(mktemp -t vagrant_sudoers)
cat /etc/sudoers > $TMP
cat >> $TMP <<EOF
# Allow passwordless startup of Vagrant when using NFS.
<?php
/**
* Radium Theme Query Class
*
* This is used to create cacheable query to boost performance
*
* @since 1.0.0
*
* @category Radium Framework
* @package NewsFront WP
<!-- I got these buttons from simplesharebuttons.com -->
<div id="share-buttons">
<!-- Buffer -->
<a href="https://bufferapp.com/add?url=https://simplesharebuttons.com&amp;text=Simple Share Buttons" target="_blank">
<img src="https://simplesharebuttons.com/images/somacro/buffer.png" alt="Buffer" />
</a>
<!-- Digg -->
<a href="http://www.digg.com/submit?url=https://simplesharebuttons.com" target="_blank">