Skip to content

Instantly share code, notes, and snippets.

View octalmage's full-sized avatar

Jason Stallings octalmage

View GitHub Profile
@octalmage
octalmage / netflix.mm
Created February 18, 2015 07:11
Netflix Classdump
/*
* Generated by class-dump 3.1.2.
*
* class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2007 by Steve Nygard.
*/
struct AppMetaData {
struct basic_string<char, std::char_traits<char>, std::allocator<char>> _field1;
struct basic_string<char, std::char_traits<char>, std::allocator<char>> _field2;
struct basic_string<char, std::char_traits<char>, std::allocator<char>> _field3;
@octalmage
octalmage / .atom-build.json
Created February 10, 2015 12:29
Atom build node-webkit on Mac. https://atom.io/packages/build
{
"cmd": "/Applications/node-webkit.app/Contents/MacOS/node-webkit",
"args": ["--enable-logging", "{FILE_ACTIVE_PATH}"]
}
@octalmage
octalmage / alsoviewing.user.js
Last active August 24, 2017 18:05
WordPress.org Also Viewing Greasemonkey userscript. https://github.com/octalmage/WordPress.org-Also-Viewing
// ==UserScript==
// @name WordPress.org Also Viewing
// @namespace http://jason.stallin.gs
// @description See when another person is viewing the same post.
// @include https://wordpress.org/support/topic/*
// @require https://code.jquery.com/jquery-1.11.0.min.js
// @require https://viewing-server.herokuapp.com/socket.io/socket.io.js
// @version 0.1.0
// ==/UserScript==
@octalmage
octalmage / play_music.h
Created December 8, 2014 18:53
Google Music Class Dump - iOS
/*
* Generated by class-dump 3.1.2.
*
* class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2007 by Steve Nygard.
*/
struct CATransform3D {
float _field1;
float _field2;
float _field3;
@octalmage
octalmage / autorestart.sh
Created September 11, 2014 04:51
Automatically restart HHVM if a url is returning a 502. I'm using the HHVM nightlies to take advantage of some new features, but it will occasionally stop responding to requests. Add this to your crontab to run every minute.
#!/bin/bash
response=$(curl -L --write-out %{http_code} --silent --output /dev/null jason.stallin.gs);
echo $response
if [ "$response" = "502" ]
then
service hhvm restart
fi
@octalmage
octalmage / mouse.js
Created August 31, 2014 18:15
Autonode example.
var autonode = require("./autonode.node");
var mouse=autonode.getMousePos();
console.log("Mouse is at x:" + mouse.x + " y:" + mouse.y);
autonode.moveMouse(mouse.x+100,mouse.y);
@octalmage
octalmage / maxcdndomains.md
Last active August 29, 2015 14:05
Add domains to MaxCDN whitelist.

How-to

  1. Put comma separated list of domains in the domains variable (no spaces).
  2. Run in JavaScript console.
@octalmage
octalmage / fix-login-403.php
Last active September 15, 2016 10:03
This fixes 403s for ajax login plugins.
<?php
/**
* Plugin Name: Fix Ajax Login on WP Engine.
* Description: Removes the wpe_login_failed_403 action.
* Version: 0.1
* Author: Jason Stallings
*/
// Prevent direct access to this file
if ( ! defined( 'ABSPATH' ) ) {
@octalmage
octalmage / dark.css
Created June 29, 2014 04:16
Zendesk theme for Stylebot
#notice {
background-color: #fefefe;
}
.blue_box_top, .blue_box_bottom, #show_agent_collision_for_ticket {
display: none;
}
.content {
border-radius: 5px;
@octalmage
octalmage / index.html
Created May 7, 2014 11:48
jQueryMobile Starter
<!DOCTYPE html>
<html>
<head>
<title>Page Title</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="http://code.jquery.com/mobile/1.4.2/jquery.mobile-1.4.2.min.css" />
<script src="http://code.jquery.com/jquery-1.11.0.min.js"></script>