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 / 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 / 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 / .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 / 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 / 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 / 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",