Skip to content

Instantly share code, notes, and snippets.

@rlynjb
rlynjb / intercept php form submittion via ajax.js
Last active September 13, 2016 18:03
how to intercept a Grav frontend form using AJAX to avoid page refresh when form submitted
/*
ref: http://stackoverflow.com/questions/12188847/intercept-form-post-string-and-send-via-ajax-instead
*/
how ajax and php forms work:
- http://code.tutsplus.com/tutorials/submit-a-form-without-page-refresh-using-jquery--net-59
follow tutorial on getgrav frontend forms:
- https://learn.getgrav.org/forms/forms
@rlynjb
rlynjb / Zipline: Build a Wikipedia Viewer.markdown
Last active February 8, 2016 21:38
Zipline: Build a Wikipedia Viewer

Intermedate Algorithm Scripting

FreeCodeCamp - Bonfire series

My FreeCodeCamp profile [http://freecodecamp.com/rlynjb]


  1. [Bonfire: Sum All Numbers in a Range] (#file-sum-all-numbers-in-a-range-js)
  2. [Bonfire: Diff Two Arrays] (#file-diff-two-arrays-js)
  3. [Bonfire: Roman Numeral Converter] (#file-roman-numeral-converter-js)
  4. [Bonfire: Where art thou] (#file-where-art-thou-js)

Basic Algorithm Scripting

FreeCodeCamp - Bonfire series

My FreeCodeCamp profile [http://freecodecamp.com/rlynjb]


  1. [Bonfire: Reverse a String] (#file-reverse-a-string-js)
  2. [Bonfire: Factorialize a Number] (#file-factorialize-a-number-js)
  3. [Bonfire: Check for Palindromes] (#file-check-for-palindromes-js)
  4. [Bonfire: Find the Longest Word in a String] (#file-find-the-longest-word-in-a-string-js)
@rlynjb
rlynjb / Zipline: Use the Twitchtv JSON API.markdown
Created October 9, 2015 17:34
Zipline: Use the Twitchtv JSON API
@rlynjb
rlynjb / Zipline: Build a Personal Portfolio Webpage.markdown
Last active October 4, 2015 18:20
Zipline: Build a Personal Portfolio Webpage
@rlynjb
rlynjb / Zipline: Show the Local Weather.markdown
Last active October 2, 2015 19:32
Zipline: Show the Local Weather
@rlynjb
rlynjb / Zipline: Build a Random Quote Machine.markdown
Last active September 30, 2015 23:32
Zipline: Build a Random Quote Machine
@rlynjb
rlynjb / gist:c977f0187d1ffb6daa31
Last active August 29, 2015 14:22
wp custom post type
// Creates Job Positions Custom Post Type
function job_positions_init() {
$args = array(
'label' => 'Job Positions',
'public' => true,
'show_ui' => true,
'capability_type' => 'post',
'hierarchical' => false,
'rewrite' => array('slug' => 'job-positions'),
'query_var' => true,
@rlynjb
rlynjb / ga.go
Last active August 14, 2018 02:08
code sample for Google API oauth using GoLang
// Hello, hope you find this code useful
package main
import (
// this is a deprecated oauth lib from godoc.org
// i was going to use the new one (https://godoc.org/golang.org/x/oauth2/google)
// but due to a bug i've found and filed at github
// i decided to revert to the old one instead until the new one is stable
"code.google.com/p/goauth2/oauth/jwt"
"encoding/json"