Skip to content

Instantly share code, notes, and snippets.

View jacksonrayhamilton's full-sized avatar

Jackson Ray Hamilton jacksonrayhamilton

View GitHub Profile
@jacksonrayhamilton
jacksonrayhamilton / division.rb
Last active December 24, 2015 04:59
A little division script for Discrete Math.
a = ARGV[0].to_i
d = ARGV[1].to_i
begin
raise '`a` (first argument) must be a non-negative integer' unless a >= 0
raise '`d` (second argument) must be a positive integer' unless d > 0
rescue Exception => e
puts "Error: #{e.message}"
Process.exit
end
@jacksonrayhamilton
jacksonrayhamilton / tts.sh
Last active December 10, 2020 21:11
Text-to-speech bash script using libttspico. Encodes to ogg and/or mp3. Decent quality. Got me through my literature class.
#!/bin/bash
#
# Takes a text file and makes an audiobook for it.
#
# Specifically:
# Converts a single text file to multiple ogg and/or mp3 files.
#
# Requires:
# libttspico-data libttspico0 libttspico-utils
@jacksonrayhamilton
jacksonrayhamilton / gist:6b89ca3b85182c490816
Last active February 18, 2018 05:23
Context coloring color schemes
(custom-theme-set-faces
'ample
'(context-coloring-level-0-face ((t :foreground "#bdbdb3")))
'(context-coloring-level-1-face ((t :foreground "#baba36")))
'(context-coloring-level-2-face ((t :foreground "#6aaf50")))
'(context-coloring-level-3-face ((t :foreground "#5180b3")))
'(context-coloring-level-4-face ((t :foreground "#ab75c3")))
'(context-coloring-level-5-face ((t :foreground "#cd7542")))
'(context-coloring-level-6-face ((t :foreground "#df9522")))
'(context-coloring-level-7-face ((t :foreground "#454545"))))
const ExampleComponent1 = React.createClass({
render: function () {
return (
<div className="example">
<h1>Example Component 1</h1>
<ul>
<li>One item</li>
<li>Another item</li>
</ul>
</div>
@jacksonrayhamilton
jacksonrayhamilton / GNUmakefile
Last active August 29, 2017 03:37
Install GNUstep on Debian 8 (with libobjc2)
# This is a template makefile for use with GNUstep make.
# After running it, your program should be executable like so:
#
# ./obj/Main
include $(GNUSTEP_MAKEFILES)/common.make
TOOL_NAME = Main
Main_OBJC_FILES = main.m # Add additional sources here.
Main_OBJCFLAGS = -fobjc-arc

Keybase proof

I hereby claim:

  • I am jacksonrayhamilton on github.
  • I am jacksonhamilton (https://keybase.io/jacksonhamilton) on keybase.
  • I have a public key whose fingerprint is 53B7 529E 72C0 503C C596 3F72 B477 1664 B476 B290

To claim this, I am signing this object: