Skip to content

Instantly share code, notes, and snippets.

View oknoway's full-sized avatar
Zip! Zap! Zop!

Nate Bedortha oknoway

Zip! Zap! Zop!
View GitHub Profile
@mixin flexbox( $display: flex, $direction: row, $wrap: wrap, $justify: start, $items: start, $content: start ) {
// <display> - flex | inline-flex
// <direction> - row | row-reverse | column | column-reverse
// <wrap> - wrap | nowrap | wrap-reverse
// <justify> - start | end | center | space-between | space-around
// <items> - start | end | center | baseline | stretch
// <content> - start | end | center | space-between | space-around | stretch
// @include flexbox( flex, row, wrap, start, start, start );
// @include flexbox( inline-flex, column, nowrap, center, start, stretch );
<select class="widefat" id="<?php echo $this->get_field_id( 'state' ); ?>" name="<?php echo $this->get_field_name( 'state' ); ?>" >
<option value="AL" <?php if ( $state == 'AL' ) echo 'selected'; ?>>Alabama</option>
<option value="AK" <?php if ( $state == 'AK' ) echo 'selected'; ?>>Alaska</option>
<option value="AZ" <?php if ( $state == 'AZ' ) echo 'selected'; ?>>Arizona</option>
<option value="AR" <?php if ( $state == 'AR' ) echo 'selected'; ?>>Arkansas</option>
<option value="CA" <?php if ( $state == 'CA' ) echo 'selected'; ?>>California</option>
<option value="CO" <?php if ( $state == 'CO' ) echo 'selected'; ?>>Colorado</option>
<option value="CT" <?php if ( $state == 'CT' ) echo 'selected'; ?>>Connecticut</option>
<option value="DE" <?php if ( $state == 'DE' ) echo 'selected'; ?>>Delaware</option>
<option value="FL" <?php if ( $state == 'FL' ) echo 'selected'; ?>>Florida</option>
// keyframes mixin
// usage:
// @include keyframes(bgcolor) {
// 0% {
// background-color: #ffccf2;
// }
// 50% {
// background-color: #ccffcc;
// }
function number_expeditions( $post_ID ) {
global $wpdb;
if ( !wp_is_post_revision( $post_ID ) ) {
$dispatchNumber = false;
$parent = wp_get_post_parent_id( $post_ID );
$dispatchArgs = array(
'use strict';
module.exports = function(grunt) {
// Project configuration.
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
dirs: {
bower: './bower_components',
lib: './lib',
'use strict';
module.exports = function(grunt) {
// Project configuration.
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
notify: {
watch: {
options: {
<?php
function 🔦($🔋) {
if ($🔋 === '🐯') {
return '🔑';
}
return '🍒';
}
// =Utility Classes
// These silent classes, called with @extend, and never output to CSS unless specifically called.
// example:
// @extend %ir;
// Image Replacement
%ir {
background-color: transparent;
border: 0;
overflow: hidden;
function loadSVG( url ) {
// AJAX-y load the SVG icon
var req = new XMLHttpRequest();
req.onload = serializeSVG;
req.open( 'get', url, true );
req.send( null );
}
function serializeSVG() {
function getWeather() {
if (false === ( $theWeather = get_transient('theWeather') ) ) {
$xmlUrl = 'http://www.google.com/ig/api?weather=portland&oe=utf-8&';
$output = wp_remote_fopen($xmlUrl);
$xmlData = simplexml_load_string($output);
$conditions = $xmlData->weather->current_conditions->condition['data'];
$raining = array( 'Showers', 'Scattered Showers', 'Chance of Rain', 'Chance of Storm', 'Rain', 'Light Rain' );