Skip to content

Instantly share code, notes, and snippets.

View jsoningram's full-sized avatar

Jason Ingram jsoningram

  • Orange County, CA
View GitHub Profile
.posts-by-cat {
width: 653px;
display: flex;
flex-direction: row;
flex-wrap: wrap;
font-family: inherit;
ul {
list-style-type: none;
margin-top: 52px;
#!/bin/bash
# command to sync ssh keys
echo "What's the user?"
read user
cat ~/.ssh/id_rsa.pub | ssh $user 'cat - >> ~/.ssh/authorized_keys'

App

  • Wordpress
  • Roku
  • iOS
  • Android

Caching Layer

Cache third-party requests.

@jsoningram
jsoningram / install-otto.md
Last active February 12, 2016 22:26
Install Hashicorp Otto
<?php
$args = array(
'orderby' => 'id',
'hide_empty' => false,
'parent' => 0
);
$terms = get_terms( 'category', $args );
$cats = get_terms( 'category', $args );
$year = date( 'Y' );
$(document).ready(function() {
appendTooltipHoverListener();
removeDuplicateHeaders();
wrapDates();
});
var tooltip = new $.tooltip();
function onFilterSelected(val) {
for (var ctrlName in appCtrl.coverflow) {
<?php
// write form submissions to text file.
// be sure to set permissions of text file to 750.
$leads = fopen('leads.txt', 'a') or die('Unable to process that request');
$txt = date(DATE_RFC2822);
$txt .= PHP_EOL;
$txt .= $body;
fwrite($leads, $txt . PHP_EOL . PHP_EOL);
fclose($leads);
<?php
$plugin_dir = realpath( dirname( __FILE__ ) . '/..' );
$plugin = $plugin_dir . '/plugin.php';
register_activation_hook( $plugin, 'f2d_activation' );
function f2d_activation() {
if ( ! wp_next_scheduled( 'send_f2d' ) ) {
wp_schedule_event( time(), 'weekly', 'send_f2d' );
}
@jsoningram
jsoningram / post-type.sql
Created May 5, 2016 23:19
Delete posts by post type SQL
DELETE FROM `wp_posts`
WHERE `post_type` = 'posttype'