Skip to content

Instantly share code, notes, and snippets.

Avatar
💭
party 🥳

Jason Stallings octalmage

💭
party 🥳
View GitHub Profile
@octalmage
octalmage / gist:11366947
Last active Aug 29, 2015
HHVM with WordPress
View gist:11366947
sudo apt-get update && sudo apt-get upgrade
sudo apt-get install python-software-properties curl
sudo apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 0xcbcb082a1bb943db
sudo add-apt-repository 'deb http://ftp.osuosl.org/pub/mariadb/repo/5.5/ubuntu precise main'
sudo apt-get update
sudo echo -e "Package: *\nPin: origin ftp.osuosl.org\nPin-Priority: 1000" | tee /etc/apt/preferences.d/mariadb
sudo apt-get install mariadb-server
mysql -uroot -p 
@octalmage
octalmage / index.html
Created May 7, 2014
jQueryMobile Starter
View index.html
<!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>
@octalmage
octalmage / dark.css
Created Jun 29, 2014
Zendesk theme for Stylebot
View dark.css
#notice {
background-color: #fefefe;
}
.blue_box_top, .blue_box_bottom, #show_agent_collision_for_ticket {
display: none;
}
.content {
border-radius: 5px;
@octalmage
octalmage / maxcdndomains.md
Last active Aug 29, 2015
Add domains to MaxCDN whitelist.
View maxcdndomains.md

How-to

  1. Put comma separated list of domains in the domains variable (no spaces).
  2. Run in JavaScript console.
@octalmage
octalmage / mouse.js
Created Aug 31, 2014
Autonode example.
View mouse.js
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);
View .atom-build.json
{
"cmd": "/Applications/node-webkit.app/Contents/MacOS/node-webkit",
"args": ["--enable-logging", "{FILE_ACTIVE_PATH}"]
}
@octalmage
octalmage / netflix.mm
Created Feb 18, 2015
Netflix Classdump
View netflix.mm
/*
* 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;
View designer.html
<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">
View custom-cache-buddy.php
<?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 Aug 11, 2015
RobotJS - Automate Alt+Tab.
View robotjs_alt_tab.js
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');