Skip to content

Instantly share code, notes, and snippets.

View sbseltzer's full-sized avatar

Sam Seltzer-Johnston sbseltzer

View GitHub Profile
#!/bin/bash
# To install:
# Save as runspacemacs and make sure it's in your PATH (I keep mine in ~/bin)
# Run chmod u+x runspacemacs
new_frame=""
if [ "$1" == "" ]; then
new_frame="-c"
fi
emacsclientw $new_frame -a "" $@ &
@sbseltzer
sbseltzer / 1_ubuntu_terminal_command
Last active July 30, 2018 19:54 — forked from lucasdavila/1_ubuntu_terminal_command
Installing Source Code Pro fonts in ubuntu
# to execute this gist, run the line bellow in terminal
\curl -L https://gist.githubusercontent.com/seltzy/2e9c791bf8f57a388cfffc4dd92824db/raw/1c100cae16a06bef154af0f290d665405b554b3b/install_source_code_pro.sh | sh
@sbseltzer
sbseltzer / Makefile
Last active March 23, 2017 14:28
Root Makefile for use with Orx
# Requires MSBuild.exe and CL.exe for your respective Visual Studio version to be in your System Environment Path variable.
ifeq ($(OS),Windows_NT)
VS_VERSION = vs2013
endif
# Tutorials
tsbuild:
ifeq ($(OS),Windows_NT)
tutorial/build/premake4 --file=tutorial/build/premake4.lua $(VS_VERSION)
else
@sbseltzer
sbseltzer / timestamp.js
Created October 31, 2016 16:54 — forked from hurjas/timestamp.js
Print out a nicely formatted timestamp in JavaScript.
/**
* Return a timestamp with the format "m/d/yy h:MM:ss TT"
* @type {Date}
*/
function timeStamp() {
// Create a date object with the current time
var now = new Date();
// Create an array with the current month, day and time
@sbseltzer
sbseltzer / .gitignore
Last active August 30, 2015 02:20 — forked from thebeardphantom/.gitignore
Unity GitIgnore
# Ignore everything
/*
/*/
# Inverse ignore some stuff
!/Assets/
!/ProjectSettings/
!.gitignore
# OS Stuff
@sbseltzer
sbseltzer / swizzle.lua
Created February 14, 2015 16:27
A simple function that adds configurable swizzling to any metatable.
--[[
MakeSwizzle
Add swizzling functionality to a metatable!
@param MOriginal - Original metatable to add swizzling to.
@param keys - Ordered array of key names we want to swizzle on.
@param components - Ordered array of characters to associate with the key names from the keys array.
@param defaults - Optional list of default values to be used when t[GetComponent(c)] == nil.
@param constructor - When swizzling on valid keys, a list of associated values preceded by the custom swizzle metatable is passed to the constructor (in keys) from the __index metamethod, that is, constructor(MSwizzle, ...). The result of this function is returned by the __index metamethod.
@return MOriginal - The original metatable (which has been modified).
@return GetKey(i) - A function that returns the key name at index i from the keys parameter.
@sbseltzer
sbseltzer / tumblr_rwu_test.php
Created February 12, 2012 05:56
Testing TumblrRWU
<?php
header( "Content-Type: text/plain" );
echo "Welcome to the test!\n";
include "TumblrReader.php";
include "TumblrWriter.php";
include "TumblrUser.php";
$consumer_key = 'your_consumer_key';
$consumer_secret = 'your_secret_key';