Skip to content

Instantly share code, notes, and snippets.

@aaronbieber
aaronbieber / vimrc
Last active November 23, 2022 03:12 — forked from heygarrett/vimrc
" Set colorscheme to solarized
colorscheme solarized
" Change the Solarized background to dark or light depending upon the time of
" day (5 refers to 5AM and 17 to 5PM). Change the background only if it is not
" already set to the value we want.
function! SetSolarizedBackground()
if strftime("%H") >= 5 && strftime("%H") < 17
if &background != 'light'
set background=light
@aaronbieber
aaronbieber / ttytter.pl
Created October 17, 2013 15:34
Fix the "rate limit rate failure" error in TTYtter. Users repeatedly receiving the error "-- rate limit rate failure: using 180 second fallback" can fix the issue by adding backslashes to the keys in the `$rate_limit_ref` hash. Previously no values were being returned, which resulted in a calculated rate limit of zero, hence the fallback. Find t…
$rate_limit_left = &min(
0+$rate_limit_ref->{'resources'}->{'statuses'}->{'\/statuses\/home_timeline'}->{'remaining'},
&min(
0+$rate_limit_ref->{'resources'}->{'statuses'}->{'\/statuses\/mentions_timeline'}->{'remaining'},
0+$rate_limit_ref->{'resources'}->{'search'}->{'\/search\/tweets'}->{'remaining'}));
$rate_limit_rate = &min(
0+$rate_limit_ref->{'resources'}->{'statuses'}->{'\/statuses\/home_timeline'}->{'limit'},
&min(
0+$rate_limit_ref->{'resources'}->{'statuses'}->{'\/statuses\/mentions_timeline'}->{'limit'},
@aaronbieber
aaronbieber / PebbleGlanceMulti.json
Created January 27, 2014 13:46
My "Multi" watchface for Pebble Glance
{
"layers_len": 6,
"name": "Multi",
"layers": [
{
"align": 2,
"bg": 0,
"fg": 1,
"font": 11,
"format": "%2",
#!/usr/bin/env python
import urllib, re, argparse, subprocess, sys, eyeD3
parser = argparse.ArgumentParser(description='Get music from Soundcloud.')
parser.add_argument('music_page')
options = parser.parse_args()
tag = eyeD3.Tag()
@aaronbieber
aaronbieber / funky-search.el
Last active February 11, 2016 10:59
Emacs jump to PHP function.
;; This is an attempt to mimic what the "CtrlP Funky" plug-in
;; for Vim does, allowing a "fuzzy search" of functions within
;; the current buffer.
;;
;; Because this uses completing-read (in my config., this is
;; handled by helm, which is awesome), it isn't actually
;; "fuzzy," but it gets the job done.
;;
;; Note: This is my first real attempt at writing elisp so it
;; might not be "proper."

Keybase proof

I hereby claim:

  • I am aaronbieber on github.
  • I am aaronbieber (https://keybase.io/aaronbieber) on keybase.
  • I have a public key whose fingerprint is A76D F8F7 738A CB04 376D 33B3 86ED B6C5 BCF7 C053

To claim this, I am signing this object:

@aaronbieber
aaronbieber / cvimrc
Last active August 29, 2015 14:10
cvimrc
map H previousTab
map L nextTab
let blacklists = ["https://inbox.google.com/*", "http://www.reddit.com/*", "https://mail.google.com/*", "https://inbox.google.com/*", "http://apps.pixlr.com/*", "https://docs.google.com/*", "https://archive.org/*"]
2018-08-04 15:17:16,821 - octoprint.server - INFO - --- Log roll over detected ---------------------------------------------------
2018-08-04 15:17:16,821 - octoprint.server - INFO - OctoPrint 1.3.8
2018-08-04 15:17:16,824 - octoprint.plugin.core - INFO - 15 plugin(s) registered with the system:
| Announcement Plugin (bundled) = /home/pi/oprint/lib/python2.7/site-packages/octoprint/plugins/announcements
| Autoselect Plugin (0.2.0) = /home/pi/oprint/local/lib/python2.7/site-packages/octoprint_autoselect
| Core Wizard (bundled) = /home/pi/oprint/lib/python2.7/site-packages/octoprint/plugins/corewizard
| !CuraEngine (<= 15.04) (bundled) = /home/pi/oprint/lib/python2.7/site-packages/octoprint/plugins/cura
| Custom Control Editor (0.2.1) = /home/pi/oprint/local/lib/python2.7/site-packages/octoprint_customControl
| Discovery (bundled) = /home/pi/oprint/lib/python2.7/site-packages/octoprint/plugins/discovery
| Logging (bundled) = /home/pi/oprint/lib/python2.7/site-packages/octoprint/plugins/logging
2018-08-05 10:12:43,341 /home/pi/oprint/bin/python -m pip install https://github.com/foosel/OctoPrint/archive/1.3.9.zip
2018-08-05 10:12:46,792 > Collecting https://github.com/foosel/OctoPrint/archive/1.3.9.zip
2018-08-05 10:12:48,795 > Downloading https://github.com/foosel/OctoPrint/archive/1.3.9.zip (5.0MB)
2018-08-05 10:12:55,736 > Requirement already satisfied (use --upgrade to upgrade): flask<0.11,>=0.10.1 in /home/pi/oprint/lib/python2.7/site-packages/Flask-0.10.1-py2.7.egg (from OctoPrint==1.3.9)
2018-08-05 10:12:55,737 > Requirement already satisfied (use --upgrade to upgrade): Jinja2<2.9,>=2.8.1 in /home/pi/oprint/lib/python2.7/site-packages (from OctoPrint==1.3.9)
2018-08-05 10:12:55,738 > Requirement already satisfied (use --upgrade to upgrade): werkzeug<0.9,>=0.8.3 in /home/pi/oprint/lib/python2.7/site-packages/Werkzeug-0.8.3-py2.7.egg (from OctoPrint==1.3.9)
2018-08-05 10:12:55,738 > Requirement already satisfied (use --upgrade to upgrade): tornado==4.5.3 in /home/pi/oprint/lib/python2.7/site-p
const express = require('express')
const app = express()
const config = require('./config');
const request = require('request');
app.get('/', (req, res) => {
//this will check if the code parameter is in the url, if not the
//most likely case is that this is the user's inital visit to oauth
//and we need to redirect them (Step 1) if there is a code, it most
//likely means they were redirected here from zoom oauth screen