Skip to content

Instantly share code, notes, and snippets.

@julianh2o
julianh2o / README.md
Last active Apr 13, 2017 — forked from pplante/README.md
Rentlytics - Lease Visualizer (Julian Hartline)
View README.md

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 Nov 28, 2016
Voice-activated party mode with a NodeJS Server, party mode picks random colors
View partylights.js
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 Nov 28, 2016
Voice-activated party mode with a NodeJS Server. (with Hue)
View server.js
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 Nov 28, 2016
Voice-activated party mode with a NodeJS Server.
View server.js
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 Sep 15, 2016
Simple bash refactoring function (depends on SilverSearcher)
View refactor.sh
# 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
Changes the color of subtractions in Github diffs (Tampermonkey)
View gitrecolordiffs.user.js
// ==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==
View spamfilter.user.js
// ==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 Mar 23, 2016
A function for Google Sheets that automatically fetches the number of subscribers that a subreddit has. Simply pass in the name of the subreddit.
View getSubredditSubscribers.js
// 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
View arduino.php
<?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
View FacebookSanity.js
// ==UserScript==
// @name Hide Facebook Feed
// @namespace http://www.julianhartline.com
// @version 0.2
// @description enter something useful
// @match https://www.facebook.com/*
// @copyright 2013+, Julian
// @require http://code.jquery.com/jquery-latest.js
// ==/UserScript==
You can’t perform that action at this time.