Skip to content

Instantly share code, notes, and snippets.

@parallaxisjones
parallaxisjones / wpcampus-functionality.php
Created April 21, 2018 21:42 — forked from mor10/wpcampus-functionality.php
Create custom taxonomies (hierarchical and non-hierarchical) in a WordPress plugin
<?php
// Create two taxonomies, Class and Year, for the post type "Lecture"
function wpcampuscpt_lecture_taxonomies() {
// Add Class taxonomy, make it hierarchical (like categories)
$labels = array(
'name' => _x( 'Classs', 'taxonomy general name' ),
'singular_name' => _x( 'Class', 'taxonomy singular name' ),
'search_items' => __( 'Search Classes' ),
'all_items' => __( 'All Classes' ),
'parent_item' => __( 'Parent Class' ),
Each Jenkins page has a REST API hyperlink at the bottom, this is because each page has its own endpoint.
http://localhost:8080/me
configure
Click 'Show API Token'
78e21f82a9e137614fef5b9593bcf827 = API Token
curl -s -u goll:78e21f82a9e137614fef5b9593bcf827 http://localhost:8080/crumbIssuer/api/json
@parallaxisjones
parallaxisjones / gitcheats.txt
Created February 24, 2018 15:32 — forked from chrismccoy/gitcheats.txt
git cheats
# shortform git commands
alias g='git'
# get a list of all commit messages for a repo
git log --pretty=format:'%s'
# find the nearest parent branch of the current git branch
git show-branch -a | grep '\*' | grep -v `git rev-parse --abbrev-ref HEAD` | head -n1 | sed 's/.*\[\(.*\)\].*/\1/' | sed 's/[\^~].*//'
# push changes to an empty git repository for the first time
@parallaxisjones
parallaxisjones / introspection-query.graphql
Created November 20, 2017 02:10 — forked from craigbeck/introspection-query.graphql
Introspection query for GraphQL
query IntrospectionQuery {
__schema {
queryType { name }
mutationType { name }
subscriptionType { name }
types {
...FullType
}
directives {
@parallaxisjones
parallaxisjones / introspection-query.graphql
Created November 20, 2017 02:10 — forked from craigbeck/introspection-query.graphql
Introspection query for GraphQL
query IntrospectionQuery {
__schema {
queryType { name }
mutationType { name }
subscriptionType { name }
types {
...FullType
}
directives {
@parallaxisjones
parallaxisjones / .eslintrc
Created August 1, 2017 20:53 — forked from cletusw/.eslintrc
ESLint Reset - A starter .eslintrc file that resets all rules to off and includes a description of what each rule does. From here, enable the rules that you care about by changing the 0 to a 1 or 2. 1 means warning (will not affect exit code) and 2 means error (will affect exit code).
{
// http://eslint.org/docs/rules/
"ecmaFeatures": {
"binaryLiterals": false, // enable binary literals
"blockBindings": false, // enable let and const (aka block bindings)
"defaultParams": false, // enable default function parameters
"forOf": false, // enable for-of loops
"generators": false, // enable generators
"objectLiteralComputedProperties": false, // enable computed object literal property names

Keybase proof

I hereby claim:

  • I am parallaxisjones on github.
  • I am parallaxis (https://keybase.io/parallaxis) on keybase.
  • I have a public key whose fingerprint is 9EE2 8E4B 449E 569D B137 B827 1681 13ED B31D 3E95

To claim this, I am signing this object:

#!/bin/bash
# from here: http://www.codingsteps.com/install-redis-2-6-on-amazon-ec2-linux-ami-or-centos/
# and here: https://raw.github.com/gist/257849/9f1e627e0b7dbe68882fa2b7bdb1b2b263522004/redis-server
###############################################
# To use:
# wget https://gist.githubusercontent.com/four43/e00d01ca084c5972f229/raw/install-redis.sh
# chmod 777 install-redis.sh
# ./install-redis.sh
###############################################
echo "*****************************************"
@parallaxisjones
parallaxisjones / index.html
Created January 5, 2016 20:47
leaflet sidebar issue
<div class="outer-shell">
<div id="sidebar" class="sidebar collapsed sidebar-left">
<!-- Nav tabs -->
<div class="sidebar-tabs">
<ul role="tablist" class="tablist">
<li><a href="#home" role="tab"><i class="fa fa-bars"></i></a></li>
<li><a href="#profile" role="tab"><i class="fa fa-user"></i></a></li>
<li class="disabled"><a href="#messages" role="tab"><i class="fa fa-envelope"></i></a></li>
</ul>
L.Control.Sidebar = L.Control.extend({
includes: L.Mixin.Events,
initialize: function (id, options) {
var i, child;
L.setOptions(this, options);
// Find sidebar HTMLElement
this._sidebar = L.DomUtil.get(id);