Skip to content

Instantly share code, notes, and snippets.


Ryan Seys ryanseys

Block or report user

Report or block ryanseys

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
ryanseys / play_mp3.rb
Created Apr 3, 2013
Play MP3 file in terminal using Ruby
View play_mp3.rb
pid = fork{ exec 'afplay', "song.mp3" } # on mac osx
ryanseys /
Created Apr 5, 2013
Queue Data Structure in Java
* "LinkEntry" class.
* This is an entry (or node) for a linked list containing an
* object of type E as the entry's data.
* @author Ryan Seys
* @param <E> the type of element which makes up the link entry.
public class LinkEntry<E> {
protected E element; // The entry's data.
ryanseys / mailgun.php
Created Mar 15, 2015
Sending a message with Mailgun API using PHP (no dependencies needed)
View mailgun.php
function send_mailgun($email, $body) {
$domain = "YOUR_DOMAIN.COM";
$config = array();
$config['api_key'] = "YOUR_KEY_HERE";
$config['api_url'] = "" . $domain . "/messages";
$message = array();
$message['from'] = "Mailgun <>";
ryanseys / gist:7305562
Created Nov 4, 2013
Empty array in Python treated as None-ish type
View gist:7305562
[] || 'hello' // returns []
# Python
[] or 'hello' # returns 'hello'
View deploy
set -e
echo 'Deploying...'
apt-get install -y nginx
service nginx start
update-rc.d nginx defaults
docker build -t ryanseys/hello
docker run -d ryanseys/hello
docker ps
ryanseys / Dockerfile
Last active Dec 26, 2015
Dockerfile for Node.js apps
View Dockerfile
FROM ubuntu:12.04
RUN echo "deb precise universe" >> /etc/apt/sources.list
RUN apt-get update # DATE: 2013/10/26
RUN apt-get upgrade -y
RUN apt-get install -y python-software-properties python g++ make software-properties-common
RUN add-apt-repository ppa:chris-lea/node.js && apt-get update
RUN apt-get install -y nodejs
ADD . /src
RUN cd /src; npm install
View index.html
#! stdtmpl
# proc htmlLayout(request: TRequest, content, title: string): string =
# result = ""
<!DOCTYPE html>
<script src=""></script>
<script src="/js/personabuttons.js"></script>
<script src="/js/personawatcher.js"></script>
ryanseys / gist:6826844
Created Oct 4, 2013
Export history with time-stamps
View gist:6826844
export HISTTIMEFORMAT="%F %T "; history
View get_folder.js
var obj = {
children: [
children: [
id: "item2"
id: "folder_test"
ryanseys / .zshrc
Created May 28, 2013
Turn off zsh autocorrect
View .zshrc
source $ZSH/
unsetopt correct
You can’t perform that action at this time.