Skip to content

Instantly share code, notes, and snippets.

View octalmage's full-sized avatar

Jason Stallings octalmage

View GitHub Profile
@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 / 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;
### Keybase proof
I hereby claim:
* I am octalmage on github.
* I am octalmage (https://keybase.io/octalmage) on keybase.
* I have a public key whose fingerprint is D1E3 8523 50B8 CF90 3CC3 6E8B 6D42 2240 A4B5 E3F4
To claim this, I am signing this object:
@octalmage
octalmage / designer.html
Last active August 29, 2015 14:18
designer
<link rel="import" href="../core-icon-button/core-icon-button.html">
<link rel="import" href="../core-toolbar/core-toolbar.html">
<link rel="import" href="../core-header-panel/core-header-panel.html">
<link rel="import" href="../core-input/core-input.html">
<link rel="import" href="../core-icons/core-icons.html">
<link rel="import" href="../core-icon/core-icon.html">
<link rel="import" href="../paper-radio-group/paper-radio-group.html">
<link rel="import" href="../paper-radio-button/paper-radio-button.html">
<link rel="import" href="../core-field/core-field.html">
<link rel="import" href="../paper-checkbox/paper-checkbox.html">
@octalmage
octalmage / spamhipchat.applescript
Last active January 18, 2017 16:25
Spam Hipchat.
delay 10
repeat 100 times
activate application "HipChat"
tell application "System Events" to keystroke "(parrot) (aussieparrot)"
tell application "System Events" to key code 76
delay 30
end repeat
@octalmage
octalmage / hex.c
Created July 18, 2015 15:39
C padding code - Pad a hex value with leading zeros.
#include <stdlib.h>
#include <stdio.h>
#include <math.h>
#include <string.h>
int main()
{
int hex = 11100;
//Get length of hex.
int dlen = floor(log10(abs(hex))) + 1;
@octalmage
octalmage / custom-cache-buddy.php
Created July 19, 2015 13:09
Cache Buddy Filters.
<?php
add_filter('cache_buddy_logged_in_frontend', 'cache_buddy_custom_users', 10, 2);
add_filter('cache_buddy_logged_in_paths', 'cache_buddy_custom_paths', 10, 1);
function cache_buddy_custom_users($cookie, $user)
{
//Return true if the user gets to be logged in on front end. This is only ran when the user logs in.
return false;
}
@octalmage
octalmage / robotjs_alt_tab.js
Created August 11, 2015 10:01
RobotJS - Automate Alt+Tab.
var robot = require("robotjs");
var sleep = require("sleep");
robot.keyToggle('tab', true, 'command');
robot.keyTap('tab', 'command');
sleep.sleep(2);
robot.keyTap('tab', 'command');
sleep.sleep(2);
robot.keyTap('tab', 'command');
@octalmage
octalmage / description.md
Last active September 1, 2015 02:34
Terminal Theme.

Default ohmyzsh theme, robbyrussell.

iTerm2 profile below, profile.json.

@octalmage
octalmage / .travis.yml
Created September 29, 2015 19:14
RobotJS Travis config for Node.js v4.
sudo: false
env:
- CXX=g++-4.8
language: node_js
node_js:
- 0.10
- 0.12
- 4.0.0
- iojs-v2