Skip to content

Instantly share code, notes, and snippets.

<!DOCTYPE html>
<html>
<head>
<script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
<title>tex texample</title>
</head>
<body>
$$ \sum_{a}^{z}foo $$
</body>
</html>
@julianh2o
julianh2o / README.md
Last active April 13, 2017 00:26 — forked from pplante/README.md
Rentlytics - Lease Visualizer (Julian Hartline)

Rentlytics Exercise - Lease Visualizer

Using the dataset below, build a lease history gantt chart. The X-Axis should be time, with the Y-Axis representing unique "unitName" values. On the gantt chart, each lease is represented by a rectangle, in the row corresponding to the unit. The graph should also highlight the month with the highest aggregated rent.

Please fork this CodePen to submit your result, you may use any HTML/CSS/JS preprocessors or framework you wish.

DO NOT USE A CHARTING/GRAPHING LIBRARY (excluding D3).

@julianh2o
julianh2o / partylights.js
Created November 28, 2016 18:48
Voice-activated party mode with a NodeJS Server, party mode picks random colors
var request = require("request")
var express = require('express');
var _ = require("underscore");
var app = express();
var exec = require('child_process').exec;
var lifx_token='asdasdasdasdasdasd''
var lifx_api='https://api.lifx.com/v1/lights'
var hue_token='asdasdasdasdasdasd'
@julianh2o
julianh2o / server.js
Created November 28, 2016 18:38
Voice-activated party mode with a NodeJS Server. (with Hue)
var request = require("request")
var express = require("express")
var app = express()
var LIFX_TOKEN='adbadbadbadbadbabdabdabdbad4adbadbadbadbadbabdbadbabdabdbadbabdb';
var HUE_TOKEN='adbadbadbadbadbabdabdab';
var HUE_IP="192.168.0.100";
app.get("/", function (req, res) {
res.send("Hello World!")
@julianh2o
julianh2o / server.js
Created November 28, 2016 18:18
Voice-activated party mode with a NodeJS Server.
var request = require("request")
var express = require("express")
var app = express()
var LIFX_TOKEN='adbadbadbadbadbabdabdabdbad4adbadbadbadbadbabdbadbabdabdbadbabdb';
app.get("/", function (req, res) {
res.send("Hello World!")
})
@julianh2o
julianh2o / refactor.sh
Last active September 15, 2016 01:18
Simple bash refactoring function (depends on SilverSearcher)
# Usage:
# First, search files recursively for text using ag (SilverSearcher). This could be refactored to use grep probably
# $ refactor gen 'function' > lines.txt
# Lines.txt will contain the file paths, line numbers, and line contents like so: (one entry per line)
# index.js:52: handler: function onNext() {
# Now, using your favorite editor, edit the lines.txt file with any changes you want to make to those lines (using something search replace, a text editor, or a bash script)
# Save the file and now run the script again to update all the files accordingly:
# refactor run lines.txt
# Note: You can also use `refactor dry lines.txt` to show the changes that will be made
@julianh2o
julianh2o / gitrecolordiffs.user.js
Created May 9, 2016 23:50
Changes the color of subtractions in Github diffs (Tampermonkey)
// ==UserScript==
// @name Github Recolor Diffs
// @namespace http://tampermonkey.net/
// @version 0.1
// @description Red, Green? What's that
// @author You
// @match https://github.com/*
// @grant none
// ==/UserScript==
// ==UserScript==
// @name Reddit Robin Spam Filter
// @namespace http://julianhartline.com/
// @version 0.13
// @description Adds mute functionality and spam filter
// @author Julian Hartline (julianh2o)
// @match https://www.reddit.com/robin
// @grant none
// ==/UserScript==
@julianh2o
julianh2o / getSubredditSubscribers.js
Created March 23, 2016 04:43
A function for Google Sheets that automatically fetches the number of subscribers that a subreddit has. Simply pass in the name of the subreddit.
// Installation: On a Google Sheet, go to Tools > Script Editor and paste the code into the resulting editor.
// Save and return to your editor and use as follows:
// Usage: getSubredditSubscribers("funny")
// Supports subreddits in the following forms:
// programming
// http://www.reddit.com/r/electronics
//Refresh key can be used for force a refresh by including an arbitrary number
<?php header("Content-Type: text/plain"); ?>
<?php header("Content-Disposition: inline"); ?>
#include <Adafruit_NeoPixel.h>
#ifdef __AVR__
#include <avr/power.h>
#endif
//IMPORTANT: Update the pin and length to match your LED strip!
#define PIN 5
#define LENGTH 150