Skip to content

Instantly share code, notes, and snippets.

Jason Stallings octalmage

Block or report user

Report or block octalmage

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@octalmage
octalmage / bid.yaml
Last active Jun 22, 2019
Sonm Web Server bid.yaml
View bid.yaml
duration: 0
price: 0.01 USD/h price: 1 USD/h
identity: anonymous
tag: wp
resources:
network:
overlay: true
outbound: true
View index.js
import React from 'react'
// import { Link } from 'gatsby'
import Layout from '../components/layout'
import PostsList from '../components/posts_list'
import PostsFilter from '../components/posts_filter'
const IndexPage = (data) => {
console.log('Index.js', data.length)
return (
<Layout>
View test.json
{
"tests": "96",
"failures": "5",
"errors": "0",
"testsuites": {
"Tests_Meta": {
"name": "Tests_Meta",
"tests": "18",
"failures": "1",
"errors": "0",
View lircd.conf
begin remote
name Harmony_655
bits 13
flags RC5|CONST_LENGTH
eps 30
aeps 100
one 935 836
zero 935 836
@octalmage
octalmage / bulkUpdate.js
Created May 21, 2017 — forked from davideast/bulkUpdate.js
Bulk update with .push()
View bulkUpdate.js
/**
* Send a bulk update to Firebase from an array or an object literal.
*
* When .push() is called on a Firebase reference without a parameter passed no
* trip to the server is made.
*
* ex:
* var childRef = ref.push();
*
* A reference is returned which has a push-id that can be returned by calling .name().
@octalmage
octalmage / bulkUpdate.js
Created May 21, 2017 — forked from davideast/bulkUpdate.js
Bulk update with .push()
View bulkUpdate.js
/**
* Send a bulk update to Firebase from an array or an object literal.
*
* When .push() is called on a Firebase reference without a parameter passed no
* trip to the server is made.
*
* ex:
* var childRef = ref.push();
*
* A reference is returned which has a push-id that can be returned by calling .name().
@octalmage
octalmage / if_no_title.php
Created Feb 28, 2017
Modify the edit.php screen to show post excerpts if there is no title.
View if_no_title.php
<?php
/*
Plugin Name: If No Title
Description: Modify the edit.php screen to show post excerpts if there is no title.
Version: 0.0.1
*/
add_action( 'load-edit.php', function()
{
add_filter( 'the_title', function( $title )
@octalmage
octalmage / custom_timeout.php
Created Jul 14, 2016
PHP Compatibility Custom Timeout
View custom_timeout.php
<?php
/*
Plugin Name: PHP Compatibility Custom Timeout
*/
function custom_timeout( $timeout ) {
return 0;
}
add_filter( 'wpephpcompat_scan_timeout', 'custom_timeout', 10 );
@octalmage
octalmage / example.md
Created Jul 13, 2016 — forked from lee-dohm/example.md
HTML5 <details> in GitHub
View example.md

Using <details> in GitHub

Suppose you're opening an issue and there's a lot of noisy logs that may be useful.

Rather than wrecking readability, wrap it in a <details> tag!

<spoilers>
 <summary>Summary Goes Here</summary>
@octalmage
octalmage / purge-object-cache.php
Created Jun 14, 2016
Automatically purge object cache
View purge-object-cache.php
<?php
/*
Plugin Name: Automatically purge object cache
Description: Automatically purge object cache on post changes.
*/
foreach ( array( 'trashed_post', 'delete_post', 'edit_post', 'publish_page', 'publish_post', 'save_post' ) as $hook ) {
add_action( $hook, 'wp_cache_flush' );
}
You can’t perform that action at this time.