Skip to content

Instantly share code, notes, and snippets.

View gregsabo's full-sized avatar

Greg Sabo gregsabo

View GitHub Profile
@gregsabo
gregsabo / fadein.scpt
Created August 24, 2012 12:13
Simple alarm clock with hour-long fade-in.
set volume 0
repeat until time string of (current date) starts with "7:00"
delay 10
end repeat
-- fade in volume
set my_vol to 0
repeat until my_vol = 7
set volume my_vol
set my_vol to (my_vol + 0.1)
@gregsabo
gregsabo / gist:5647482
Last active December 17, 2015 17:39
Documentation on how to use the Prom Achievements Server.
@gregsabo
gregsabo / gist:5854893
Created June 25, 2013 00:16
Yeoman newbie output. Trying out Yeoman for the first time, these commands run without errors, but the index page doesn't load ("No data received" message in the browser after a couple of minutes of no response). This is the output of me trying to get started with "Bitter" (a stupid name for a Twitter clone).
dev|⇒ mkdir bitter
dev|⇒ cd bitter
bitter|⇒ yo webapp
_-----_
| |
|--(o)--| .--------------------------.
`---------´ | Welcome to Yeoman, |
( _´U`_ ) | ladies and gentlemen! |
/___A___\ '__________________________'
@gregsabo
gregsabo / middle_america.py
Created November 2, 2013 05:11
Source code for "Middle America"
import random
choices = (
"why",
"Why",
"why?",
"why.",
"Why...",
)
choices = choices * 30 + ("why!?", "why...\n\n", "why?\n\n")
@gregsabo
gregsabo / intern_roundup.markdown
Last active January 2, 2016 03:49
Intern Retrospective Guidelines

We like to have our interns and co-ops summarize their experiences before they finish. Here are some guidelines to help develop a useful presentation.

Golden Rule: Convince us to hire you!

To be clear, your retrospective will have little impact on HubSpot's decision to make an offer. However, approaching your presentation this way will help you focus on making an impact that will give you a jump start on your career if you do join HubSpot in the future.

This is your chance to put yourself out there to make some very valuable professional connections. When you're choosing what to put on your slides, always think: "Will telling people this make them want to work with me again?"

Some things you might talk about

@gregsabo
gregsabo / ceremony.html
Created January 21, 2014 16:02
Example "Ceremony" dialog. Use with vex and style_guide.
<div class="vex-content hs-modal"><div class="list-created-modal hs-modal">
<header>
<h3>Congratulations</h3>
<a data-href="#cancel" class="fancybox-close"></a>
</header>
<section class="hs-modal-success">
<div class="complete-message-icon">
@gregsabo
gregsabo / shortener_1.py
Created March 28, 2014 16:57
URL Shortener Iteration 1
from flask import Flask
app = Flask(__name__)
@app.route("/")
def route_home():
return "Hello World!"
if __name__ == "__main__":
app.run()
@gregsabo
gregsabo / shortener_2.py
Created March 28, 2014 17:06
URL Shortener Iteration 2
from flask import Flask
from flask import request
app = Flask(__name__)
@app.route("/create")
def route_create():
url = request.args.get('url')
return "Would make a shortcode for: %s" % url
if __name__ == "__main__":
@gregsabo
gregsabo / shortener_3.py
Created March 28, 2014 17:10
URL Shortener Iteration 3
from flask import Flask
from flask import request
import md5
import base64
app = Flask(__name__)
def minihash(url):
return base64.b64encode(md5.new(url).digest())[:6]
@app.route("/create")
@gregsabo
gregsabo / shortener_4.py
Last active August 29, 2015 13:57
URL Shortener Iteration 4
import md5
import base64
import random
import json
from flask import Flask
from flask import request, redirect
import redis
app = Flask(__name__)