Skip to content

Instantly share code, notes, and snippets.

Sam Wolfson terabyte128

Block or report user

Report or block terabyte128

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
@terabyte128
terabyte128 / JekyllPublisher.py
Last active Oct 7, 2018
An easy way to manage your Jekyll website or blog (https://jekyllrb.com). Create new pages and blog posts with front matter already inserted; commit and publish to GitHub Pages.
View JekyllPublisher.py
#!/usr/local/bin/python3
# -*- coding: ascii -*-
import sys
import subprocess
import time
import argparse
def main():
parser = argparse.ArgumentParser(description="Create new Jekyll pages and publish to GitHub")
@terabyte128
terabyte128 / lifx-control.py
Created Jul 16, 2018
quick n dirty way to play with lifx light colors
View lifx-control.py
import tkinter
import lifxlan
class Application(tkinter.Frame):
def sendCommand(self, type, val):
try:
light = self.lights[int(self.selectedLight.get())]
except ValueError:
return
View GraphMain.java
import org.graphstream.graph.Edge;
import org.graphstream.graph.Graph;
import org.graphstream.graph.Node;
import org.graphstream.graph.implementations.SingleGraph;
import javax.swing.*;
import javax.swing.Timer;
import java.awt.*;
import java.util.*;
@terabyte128
terabyte128 / rpn-calculator.rb
Last active May 21, 2017
A simple Reverse Polish Notation calculator written in Ruby. Equations can be entered interactively or as arguments.
View rpn-calculator.rb
def update_stack(stack, arg)
if /-?\d+(\.\d+)?/.match arg
stack.push arg.to_f
else
i1 = stack.pop
i2 = stack.pop
begin
result = i1.send(arg, i2)
stack.push result
You can’t perform that action at this time.