Skip to content

Instantly share code, notes, and snippets.

View rufo's full-sized avatar

Rufo Sanchez rufo

  • Minneapolis, MN
View GitHub Profile
@rufo
rufo / flow.json
Created August 26, 2018 17:31
Example RSS flow
[
{
"id": "2b142d34.a6f53a",
"type": "tab",
"label": "Flow 1",
"disabled": false,
"info": ""
},
{
"id": "a0ce6df4.9e2fb8",
@rufo
rufo / base16-default-dark.js
Created March 19, 2018 16:09
Test base16-blink color scheme fix
// Base16 Default Dark
// Scheme: Chris Kempson (http://chriskempson.com)
base00 = '#181818';
base01 = '#282828';
base02 = '#383838';
base03 = '#585858';
base04 = '#b8b8b8';
base05 = '#d8d8d8';
base06 = '#e8e8e8';
@rufo
rufo / unlock.rb
Created July 20, 2017 01:32
Sinatra app for unlocking your PC via VNC (for steam)
require 'bundler/inline'
gemfile true do
source 'https://rubygems.org'
gem 'ruby-vnc', '~>1.1.0', require: 'net/vnc'
gem 'sinatra', '~>2.0.0'
end
require 'sinatra/base'
@rufo
rufo / .vimrc
Created June 2, 2017 20:07
Change vim settings settings based on power status
" requires vim 8 for timer support
function! UpdatePowerSaving(timerId)
if executable('pmset')
call system("pmset -g batt | head -1 | grep 'Battery'")
if !v:shell_error
" on battery
let g:ale_lint_delay=10000
else
" power adapter
@rufo
rufo / content.haml
Created February 1, 2015 16:50
Centered vertical text using flexbox
.container
.header-container
.header
.text Prepress
.cell
%p Content 1
%p There is more content that goes here
%p look at all the content
.cell
@rufo
rufo / quimbys.coffee
Created November 8, 2014 17:38
Quimby's hubot script
cheerio = require('cheerio')
module.exports = (robot) ->
robot.respond /quimby|JBQ/i, (msg) ->
robot.http("http://www.jbquimbys.com/menu.php").get() (error, response, body) ->
$ = cheerio.load(body)
title = cleanText $("td#title").text()
body = cleanText $("td#title").parent().next().html()
body = body.split(/\<table[ \w\d"=%]+\>/)
body = body.map (item) -> cleanItem(item)
@rufo
rufo / .vimrc
Created January 4, 2012 20:23
vim setup
" with inspiration from http://stevelosh.com/blog/2010/09/coming-home-to-vim/
filetype off
call pathogen#runtime_append_all_bundles()
call pathogen#helptags()
filetype plugin indent on
set nocompatible
set tabstop=2
@rufo
rufo / lcd.rb
Created May 20, 2011 00:53
Rochester.rb LCD Number Solution
#!/usr/bin/env ruby
@numbers = [
["-", "|", "|", " ", "|", "|", "-"],
[" ", " ", "|", " ", " ", "|", " "],
["-", " ", "|", "-", "|", " ", "-"],
["-", " ", "|", "-", " ", "|", "-"],
[" ", "|", "|", "-", " ", "|", " "],
["-", "|", " ", "-", " ", "|", "-"],
["-", "|", " ", "-", "|", "|", "-"],
@rufo
rufo / initializer.rb
Created May 11, 2011 19:41
SWFUpload Rails 2.3 server side code
ActionController::Dispatcher.middleware.insert_before(ActionController::Base.session_store, FlashSessionCookieMiddleware, ActionController::Base.session_options[:session_key])
@rufo
rufo / .zshrc
Created November 17, 2010 22:20
export PATH="/opt/android-sdk/tools:/opt/android-sdk/platforms/android-1.5/tools:/usr/local/libexec/git-core:/usr/local/bin:/usr/local/sbin:/usr/local/mysql/bin:/opt/local/bin:$PATH"
export MANPATH="/usr/local/man:/usr/local/mysql/man:$MANPATH"
export EDITOR="mate -w"
export CLICOLOR=true
export MENU_COMPLETE=false
export CDPATH=.:~/Dropbox/Projects:~/Projects:~/Dropbox/sandbox
export ARCHFLAGS="-arch x86_64"
HISTSIZE=1000
SAVEHIST=1000