This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var CONFIG = { | |
PROJECT_URL: 'https://nib.local', | |
SOURCE: { | |
scripts: 'source/js/**/*.js', | |
styles: 'source/scss/**/*.scss', | |
images: 'source/images/*', | |
php: '**/*.php' | |
}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Import CSS. | |
import './style.scss'; | |
import './editor.scss'; | |
import {List_Item, List_Item_Edit} from './list_item.js'; | |
const {__} = wp.i18n; // Import __() from wp.i18n | |
const {registerBlockType} = wp.blocks; | |
const {Component} = wp.element; | |
const { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
INSTALL=$1 | |
ssh $INSTALL@$INSTALL.ssh.wpengine.net% |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT | |
table_schema as `Database`, | |
table_name AS `Table`, | |
round(((data_length + index_length) / 1024 / 1024), 2) `Size in MB` | |
FROM information_schema.TABLES | |
ORDER BY (data_length + index_length) DESC |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// this sample is in MU-plugins. It's just a sample | |
// pattern about how you can use a namespaced class to | |
// decrease how much is injected into the global name space | |
namespace Materiell; | |
class Google_AMP_Mods { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
2-stick Serial Controller w/ xBee funcionality | |
*/ | |
#include <SoftwareSerial.h> | |
#define echoToSerialOut true | |
#define rxPin 2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* setup custom general settings */ | |
function ts_theme_settings () { | |
register_setting( 'general', 'homepage_slider_wide' ); | |
add_settings_field( | |
'homepage_slider_wide', | |
'Homepage Slider (Wide)', | |
'homepage_slider_wide_callback', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var dial_hasBeenTriggered = false, | |
bar_hasBeenTriggered = false; | |
function increase_dial(element, value, originalValue) { | |
if( !originalValue ) { | |
originalValue = element.data('target-value').toString(); | |
} | |
var currentVal = value || 0; | |
element.val(currentVal).trigger('change'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<article <?php post_class('clearfix ' . oneMenu_randomColor() ); ?>></article> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script> | |
(function($) { | |
$(document).ready(function (){ | |
// here we can add <li><button class="addNewSiblingField">Add New</button></li>, and it will auto setup a list to add and remove arbitrary elements | |
$('.addNewSiblingField').closest('ul').addClass('addNewSiblingsList'); | |
$('.addNewSiblingField').parent().siblings().append('<button class="removeSiblingField">Remove</button>'); | |
$('.addNewSiblingsList').on('click', '.addNewSiblingField', function(e){ |
NewerOlder