Skip to content

Instantly share code, notes, and snippets.

💍
Got Married

Jamie Holding cubehouse

💍
Got Married
Block or report user

Report or block cubehouse

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
@cubehouse
cubehouse / gist:7f3ee1b243a1f54bd49f
Created Sep 8, 2014
Changes in WordPress 4.0 Authentication Cookie Structure (MD5 to Sha256)
View gist:7f3ee1b243a1f54bd49f
@@ class WPAuth
// Validate the hash contained within the cookie
$pass_frag = substr($user['user_pass'], 8, 4);
- $key = $this->wp_hash($user['user_login'].$pass_frag.'|'.$cookie[1], 'logged_in');
- $hash = hash_hmac('md5', $user['user_login'].'|'.$cookie[1], $key);
+
+ $key = $this->wp_hash($user['user_login'].'|'.$pass_frag.'|'.$cookie[1].'|'.$cookie[2], 'logged_in');
+ $hash = hash_hmac('sha256', $user['user_login'].'|'.$cookie[1].'|'.$cookie[2], $key);
View keybase.md

Keybase proof

I hereby claim:

  • I am cubehouse on github.
  • I am cube (https://keybase.io/cube) on keybase.
  • I have a public key whose fingerprint is 540F D214 7335 C873 B847 2A2A 9F15 B927 BD57 3D36

To claim this, I am signing this object:

@cubehouse
cubehouse / gist:5a5cbb831ef630c482e9
Last active Aug 29, 2015
Prosody Node.JS Auth Template
View gist:5a5cbb831ef630c482e9
// create readline interface (standard NodeJS module)
var readline = require('readline');
var rl = readline.createInterface({
input: process.stdin,
output: process.stdout
});
// listen for anything supplied on stdin
rl.on('line', function (cmd) {
// default result is 0
@cubehouse
cubehouse / bp_parse.js
Created Dec 24, 2016
Factorio BluePrint String Parser in NodeJS
View bp_parse.js
var input = `H4sIAAAAAAAA/42R0WrDMAxFfyX0OYImg74Uf0vxbK0V2HImOWHD5N/ndKOsacn2FAjn5lzd+NSE5G
xoTqYgZ8qEakphG9HsrCrG10B8hmjdhRih37VD0oolNuXDwEv7afbz3P4kNFrJQKwoGWXFdle29STo
ri8Pt1xIZ9JMDtwFNcNQzTQhDJIm8usP7e+df7dclYzoaYyAodaQ6hxSwPvA0hS6/531cFV/i71Z3R
yjex5bjSH4PtbnsxV+VdxwPagONUYu8fKniT0uyMaW1fFN9ZvUPB8F8yjcnI7I/gvQdo5aWgIAAA==`;
var crypto = require("crypto");
var zlib = require("zlib");
var LuaVMJS = require('lua.vm.js');
@cubehouse
cubehouse / WDWEntertainmentAreas.js
Created Nov 19, 2017
Walt Disney World - Entertainment Area Opening Times Fetching
View WDWEntertainmentAreas.js
// include themeparks library
const themeparks = require("themeparks");
// extend random Disney World park and override few bits we need (WDW Magic Kingdom has most the configuration already that we need)
class DisneysTyphoonLagoon extends themeparks.Parks.WaltDisneyWorldMagicKingdom {
constructor(options = {}) {
options.name = options.name || "Disney's Typhoon Lagoon";
options.latitude = options.latitude || 28.3650;
View AnimatedImage.cpp
#include "AnimatedImage.h"
void UAnimatedImage::SetCurrentFrame(int32 Frame)
{
CurrentFrame = Frame;
if (CurrentFrame < 0) CurrentFrame = 0;
if (CurrentFrame > TotalFrames - 1) CurrentFrame = TotalFrames - 1;
SynchronizeProperties();
}
@cubehouse
cubehouse / DisableASW.bat
Created Apr 18, 2018
Quick bat file to disable Space Warp on Oculus Rift
View DisableASW.bat
echo server:asw.Off > "TEMP.txt"
echo exit >> "TEMP.txt"
call "C:\Program Files\Oculus\Support\oculus-diagnostics\OculusDebugToolCLI.exe" -f "%~dp0\TEMP.txt"
del "TEMP.txt"
@cubehouse
cubehouse / tokyodisney.patch
Created Jun 3, 2018
Quick fix for Tokyo wait times
View tokyodisney.patch
diff --git a/lib/disneytokyo/index.js b/lib/disneytokyo/index.js
index 6a6e26a..0c95059 100644
--- a/lib/disneytokyo/index.js
+++ b/lib/disneytokyo/index.js
@@ -64,7 +64,7 @@ class DisneyTokyoPark extends Park {
var rideObject = this.GetRideObject({
id: ride.ID,
- name: rideData[ride.ID]
+ name: ride.Name
@cubehouse
cubehouse / index.js
Created Jul 8, 2018
Efteling New App - July 2018
View index.js
const Moment = require("moment-timezone");
const Park = require("../park");
const GeoLocation = require("../geoLocation.js");
const s_apiVersion = Symbol();
const s_apiKey = Symbol();
const s_searchURL = Symbol();
const s_waitTimesURL = Symbol();
@cubehouse
cubehouse / test.dart
Created Aug 12, 2018
Flutter Tab Crash #11895
View test.dart
import 'package:flutter/material.dart';
void main() {
runApp(TabBarDemo());
}
class TabBarDemo extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
You can’t perform that action at this time.