Skip to content

Instantly share code, notes, and snippets.

View jakerb's full-sized avatar
🏠
Working from home

Jake Bown jakerb

🏠
Working from home
View GitHub Profile
@jakerb
jakerb / index.js
Last active November 27, 2020 16:35
Control your Sky TV with Node!
/*
* Control your Sky TV with Node!
* @author jakerb
*
* @usage
* --- Top Buttons --- *
* node index.js sky
* node index.js power
* node index.js tvguide
* node index.js home
#include <Bridge.h>
#include <HttpClient.h>
const int buttonPin = 2;
void setup() {
pinMode(buttonPin, INPUT);
}
void loop() {
(function($) {
$('div.wplsp-live table thead tr th[colspan]').attr('colspan','')
})(jQuery);
div.wplsp-live > table > thead > tr > th:nth-child(6),
div.wplsp-live > table > thead > tr > th:nth-child(7),
div.wplsp-live > table > thead > tr > th:nth-child(8),
div.wplsp-live > table > tbody > tr > td:nth-child(8),
div.wplsp-live > table > tbody > tr > td:nth-child(9),
div.wplsp-live > table > tbody > tr > td:nth-child(10),
div.wplsp-live > table > tbody > tr > td img {
display: none
}
<?php
$project_query = $_GET['project'];
$projects = array(
'/test1/public/',
'/mynewproject/public/',
'site3/public/'
);
@jakerb
jakerb / CordovaFileCache.js
Last active May 14, 2019 11:55
Modular file caching for Appuccino.
var CordovaFileCache =
/******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = {};
/******/ // The require function
/******/ function __webpack_require__(moduleId) {
/******/ // Check if module is in cache
/******/ if(installedModules[moduleId])
@jakerb
jakerb / function.php
Created February 13, 2019 14:39
Add children to Post Object
<?php
function add_children_to_pages($response) {
foreach($response['posts'] as $index => $post) {
$args = array(
'post_type' => 'app_pages',
'posts_per_page' => -1,
'post_parent' => $post->ID,
@jakerb
jakerb / functions.php
Created February 13, 2019 14:02
List App Pages
<?php
$args = array(
'post_type' => 'app_pages',
'posts_per_page' => -1,
'orderby' => 'title',
'order' => 'ASC'
);
$app_pages = new WP_Query( $args );
@jakerb
jakerb / main.js
Created January 29, 2019 15:44
Unwrap template includes
/**
* Provide some Javascript to be included within your application.
*
* @link https://myappuccino.com/
* @since 1.0.0
*
* @package Appuccino
*/
@jakerb
jakerb / blog_article.php
Created September 14, 2018 13:21
MyAppuccino Article template.
<!-- Include the header file -->
<div ng-include="app.app.base_url + 'partials/header.html'"></div>
<!-- Include the header file -->
<div class="page-has-header page-has-footer">
<h2 ng-bind="data.blog_posts[params.pid].post_title"></h2>
<p class="uk-text-meta">Posted <span ng-bind="data.blog_posts[params.pid].post_date"></span></p>
<p ng-bind="data.blog_posts[params.pid].post_content"></p>