Skip to content

Instantly share code, notes, and snippets.

@travishaynes
travishaynes / customui.dtd
Created November 14, 2020 00:45
Schema definition for Ribbon Extensibility
<?xml version="1.0" ?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" version="1.0"
targetNamespace="http://schemas.microsoft.com/office/2006/01/customui"
xmlns="http://schemas.microsoft.com/office/2006/01/customui" elementFormDefault="qualified" attributeFormDefault="unqualified">
<xsd:annotation>
<xsd:documentation>
----------------------------------------------------------------------
Schema definition for Ribbon Extensibility
----------------------------------------------------------------------
</xsd:documentation>
package com.badlogic.gdx.backends.lwjgl3;
import com.badlogic.gdx.*;
import com.badlogic.gdx.backends.headless.*;
import com.badlogic.gdx.backends.headless.mock.audio.MockAudio;
import com.badlogic.gdx.graphics.g2d.SpriteBatch;
import com.badlogic.gdx.utils.Array;
import com.badlogic.gdx.utils.Clipboard;
import com.badlogic.gdx.utils.ObjectMap;
@travishaynes
travishaynes / update-atom.sh
Created August 14, 2017 23:22
A shell script to download and update Atom (atom.io) for Debian based operating systems.
#!/usr/bin/env bash
#
# Checks to see if atom.io has a newer stable release than what is currently
# installed, and updates it when necessary.
#
# Dependencies:
#
# * awk
# * curl
# * dpkg
/*
* object.watch polyfill
*
* 2012-04-03
* Last Updated: 2015-03-24 by Travis Haynes
*
* By Eli Grey, http://eligrey.com
* Public Domain.
* NO WARRANTY EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK.
*/
@travishaynes
travishaynes / gist:8801265
Created February 4, 2014 10:31
Shopify / embedded-app-example OAuth2 authentication failure
D, [2014-02-04T10:18:07.451680 #2783] DEBUG -- :
D, [2014-02-04T10:18:07.451863 #2783] DEBUG -- :
I, [2014-02-04T10:18:07.452532 #2783] INFO -- : Started GET "/auth/shopify/callback?shop=[filtered]&signature=[filtered]&timestamp=1391509087&admin=1" for 10.0.2.2 at 2014-02-04 10:18:07 +0000
I, [2014-02-04T10:18:07.912449 #2783] INFO -- omniauth: (shopify) Setup endpoint detected, running now.
I, [2014-02-04T10:18:07.913078 #2783] INFO -- omniauth: (shopify) Callback phase initiated.
E, [2014-02-04T10:18:08.485084 #2783] ERROR -- omniauth: (shopify) Authentication failure! invalid_credentials: OAuth2::Error, invalid_request:
{"error":"invalid_request"}
F, [2014-02-04T10:18:08.487399 #2783] FATAL -- :
OAuth2::Error (invalid_request:
{"error":"invalid_request"}):
@travishaynes
travishaynes / gist:7603598
Created November 22, 2013 17:21
This is my script for screen-casting on Linux Mint 14. It records the desktop, computer audio, and the microphone, each on a separate track. To tie everything together I use OpenShot Video Editor.
#!/bin/bash
arecord -D plughw:0,0 \
-f S16_LE \
-c1 \
-r44100 \
-t wav \
latest-computer.wav \
&
@travishaynes
travishaynes / gallery.html
Created May 18, 2012 01:55
The simplest jQuery fading image gallery.
@travishaynes
travishaynes / Gemfile
Created April 13, 2012 17:56
Shopify OAuth2 Authentication
gem 'shopify_api'
gem 'omniauth-shopify-oauth2'
gem 'slim-rails'
@travishaynes
travishaynes / client.js
Created April 12, 2012 20:37
Using EasyXDM in Shopify to access the cart
window.Shopify = new EasyXDM.Rpc({
remote: "http://domain.myshopify.com/cart"
}, {
remote: {
getCart: {}
}
});
@travishaynes
travishaynes / routes.rb
Created February 24, 2012 21:06
Shopify session controller & specs
resource :shopify_session, only: [:new, :create, :destroy]