Skip to content

Instantly share code, notes, and snippets.

View Jamesking56's full-sized avatar

James King Jamesking56

View GitHub Profile
@Jamesking56
Jamesking56 / rebase.sh
Created March 4, 2019 08:09
Git Rebaser - Rebase your branch using a given base branch. No need for merge commits!
#!/bin/sh
set -eu
if [ $# -eq 0 ]; then
echo "Git Rebaser" >&2
echo "Usage:" >&2
echo "rebase {base_branch}" >&2
exit 1
fi

Keybase proof

I hereby claim:

  • I am Jamesking56 on github.
  • I am jamesking56 (https://keybase.io/jamesking56) on keybase.
  • I have a public key whose fingerprint is 7ADA AC6A 97B2 AA4C DF5E 9472 0F1B DE01 1363 C5E8

To claim this, I am signing this object:

@Jamesking56
Jamesking56 / oauth.php
Created February 12, 2013 22:25
Wordpress to Tumblr
<?php
$req_url = 'http://www.tumblr.com/oauth/request_token';
$authurl = 'http://www.tumblr.com/oauth/authorize';
$acc_url = 'http://www.tumblr.com/oauth/access_token';
$conskey = 'YOUR CONSUMER KEY';
$conssec = 'YOUR CONSUMER SECRET';
session_start();
@Jamesking56
Jamesking56 / WordPress.class.php
Last active April 19, 2021 12:05
Read Wordpress Export XML to PHP
<?php
/**
* WordPress class - Manages the WordPress XML file and gets all data from that.
*/
class Wordpress
{
public static $wpXML;
@Jamesking56
Jamesking56 / ErrorHandler.class.php
Created November 10, 2012 20:57
PHP: Simple PHP error handler with extra features.
<?php
/*
ErrorHandler Class
By James King
v0.1 Alpha
WARNING: This class is still in ALPHA phase. Not recommended for production.
Manages and handles any PHP errors found in your script.