Skip to content

Instantly share code, notes, and snippets.

View mikerudolph's full-sized avatar

Mike Rudolph mikerudolph

  • Nova Scotia, Canada
View GitHub Profile
@mikerudolph
mikerudolph / DataGrip.desktop
Created June 21, 2016 20:03
DataGrip Application launcher
[Desktop Entry]
Version=2016.1.1
Type=Application
Terminal=false
Icon[en_US]=/usr/local/bin/DataGrip/bin/product.png
Name[en_US]=DataGrip
Exec=/usr/local/bin/DataGrip/bin/datagrip.sh
Name=DataGrip
Icon=/usr/local/bin/DataGrip/bin/product.png
@mikerudolph
mikerudolph / init.vim
Created June 21, 2016 16:39
neovim config
set encoding=utf-8 nobomb
" Neovim Config
let mapleader=","
" Autoinstall
if empty(glob('~/.config/nvim/autoload/plug.vim'))
silent ! curl -fLo ~/.config/nvim/autoload/plug.vim --create-dirs
\ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
# remap prefix from 'C-b' to 'C-a'
unbind C-b
set-option -g prefix C-a
bind-key C-a send-prefix
# split panes using | and -
bind-key | split-window -h
bind-key \ split-window -h
bind-key _ split-window -v
bind-key - split-window -v
@mikerudolph
mikerudolph / gist:a98dbf568abda7d00656
Created August 5, 2014 17:17
Go REST api serving json file used for benchmarking.
package main
import (
"log"
"io/ioutil"
"net/http"
"github.com/ant0ine/go-json-rest/rest"
)
@mikerudolph
mikerudolph / Rdio Proxy
Last active March 11, 2016 18:19
I wanted to see how easy it was to download Rdio songs as you listen to them, turns out its just as easy as I though.
var http = require('http'),
url = require('url'),
fs = require('fs');
var port = 9000;
var httpServer = http.createServer(function(request, response) {
var parsedUrl = url.parse(request.url);
var requestData;
var requestOpts = {
@mikerudolph
mikerudolph / tmuxBattery.rb
Created November 20, 2013 20:17
Ruby script to pipe `pmset` for battery info and display status back in readable text. Created for display in tmux status bar.
#!/usr/bin/env ruby
# encoding utf-8
status = Hash.new()
if ARGF === nil
puts "NA"
exit
end
@mikerudolph
mikerudolph / app.js
Created September 23, 2013 19:38
Simple way to pull images from and RSS feed and download them to local storage with Node.js
#!/usr/local/bin/node
/**
* Dependencies
*/
var app = require('commander')
, FeedParser = require('feedparser')
, fs = require('fs')
, request = require('request')
function name {
say "doing stuff"
cat > $WORKSPACE/config.yml <<-CONFIG
hub:
host: "local"
path: "/hub"
port: "80"
CONFIG
}