Skip to content

Instantly share code, notes, and snippets.

View cabrinha's full-sized avatar

cabrinha

  • California
View GitHub Profile
@cabrinha
cabrinha / read_redis.py
Last active January 22, 2017 09:34
Retrieve a key from redis and parse it's values
#!/usr/bin/env python
import sys
import redis
import json
import argparse
parser = argparse.ArgumentParser(
description='', add_help=True)
parser.add_argument('-H', '--host', default='localhost', metavar='HOST',
21:42 $ brew config
HOMEBREW_VERSION: 0.9.9
ORIGIN: https://github.com/Homebrew/brew.git
HEAD: 06fe347de97975dc01e726f87bf07a56a6fb713e
Last commit: 8 weeks ago
Core tap ORIGIN: https://github.com/Homebrew/homebrew-core
Core tap HEAD: b163b0d8271500557664422d6fdc3054d0ff7d31
Core tap last commit: 8 weeks ago
HOMEBREW_PREFIX: /Users/cabrinha/homebrew
HOMEBREW_REPOSITORY: /Users/cabrinha/homebrew
-- Call up the bar
--require("bar")
-- Window borders
-- require("border")
-- Hotkey mash
local mash = {"cmd", "alt"}
local mash_move = {"cmd", "ctrl"}
local mashed = {"cmd", "alt", "ctrl"}
colorscheme Tomorrow-Night-Eighties
set nospell
set nofoldenable
set tabstop=8 softtabstop=0 expandtab shiftwidth=4 smarttab
filetype plugin indent on
augroup VIM
autocmd!
au FileType puppet setlocal tabstop=8 expandtab shiftwidth=2 softtabstop=2
augroup END
set -g status-left '#[fg=colour16,bg=colour254,bold] #S #[fg=colour254,bg=colour234,nobold,nounderscore,noitalics]'
set -g status-right '#[fg=colour236,bg=colour0,nobold,nounderscore,noitalics]#[fg=colour247,bg=colour236]%Y-%m-%d  %H:%M #[fg=colour252,bg=colour236,nobold,nounderscore,noitalics]#[fg=colour235,bg=colour252] #h '
setw -g window-status-format '#[fg=colour244,bg=colour234] #I #[fg=colour250,bg=colour234] #W#[fg=colour236,bg=colour0,nobold,nounderscore,noitalics] '
setw -g window-status-current-format '#[fg=colour234,bg=colour31,nobold,nounderscore,noitalics]#[fg=colour117,bg=colour31] #I #[fg=colour231,bg=colour31,bold] #W #[fg=colour31,bg=colour234,nobold,nounderscore,noitalics]'
<!doctype html>
<html lang="en-GB" id="Stencil">
<head >
<script>
YUI_config = {
lang: "en-GB",
combine: true,
comboBase: 'https://s.yimg.com/zz/combo?',
root: 'yui:3.15.0/'
};
@cabrinha
cabrinha / soup.py
Last active December 17, 2015 20:29
#!/usr/bin/env python
import requests
from bs4 import BeautifulSoup
#url = 'https://uk.groups.yahoo.com/neo/groups/HeimdagsLibrary/conversations/messages/1'
url = 'https://uk.groups.yahoo.com/neo/groups/HeimdagsLibrary/conversations/topics/1'
cookies = {'DSS': 'ts=1442348183&cnt=0&sdts=1445305404&sdtp=mozilla', 'AO': 'u=1', 'YLS': 'v=1&p=1&n=1', 'ypcdb': '69cd7fb4296161babab534e4ad0d47ea', 'B': '67l11ihavgv4j&b=4&d=ODec0pRpYEKJLWCYxZEwzXL2fPk-&s=4k&i=Jz5T.GiEm3rdVsNrrFCU', 'Y': 'v=1&n=5kr1dhpkab8fs&l=m8ddo.gjf8/o&p=m2s0000012000000&r=v2&lg=en-US&intl=us', 'PH': 'fn=KYNqFqE1adTUVw19k4TC_A--&l=en-US&i=us', 'ywandp': '1000714451879%3A1849880863'}
headers = {"User-Agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:42.0) Gecko/20100101 Firefox/42.0",
"Accept": "text/html"}
#!/usr/bin/env python
import requests
from lxml import html
url = requests.get('https://uk.groups.yahoo.com/neo/groups/HeimdagsLibrary/conversations/topics/1')
tree = html.fromstring(url.content)
authors = tree.xpath('//div[@class="author fleft fw-600"]/text()')
summary = tree.xpath('//div[@class="summary"]/text()')

Hi.

I hereby claim:

  • I am internaught on github.
  • I am yuppie on keybase.
  • I am ScottaBeTrue on Twitter.
  • I have a public key whose fingerprint is 5B5B F3DA E042 BD83 7CFF 36B1 F4E1 6BED 1170 9D47

To claim this, I am signing this object:

@cabrinha
cabrinha / bar.lua
Created November 17, 2015 21:28
I think I'm doing the time part ... wrong.
-- Trying to make a status bar
-- Internaught 11/11/15
-- I guess this draws a border?
-- local boxBorder = 2
-- create some empty tables for our objects
local bars = {}
local iTunesBoxes = {}
local iTunesTimers = {}