Skip to content

Instantly share code, notes, and snippets.

View bkuri's full-sized avatar

Bernardo Kuri bkuri

View GitHub Profile
@bkuri
bkuri / __init__.py
Created October 13, 2013 19:59
My kivy gauge widget
#!/usr/bin/env python2
# -*- coding: utf-8 -*-
__all__ = ('Gauge',)
__title__ = 'bkuri.gauge'
__version__ = '0.1'
__author__ = 'gauge@bkuri.com'
import kivy
kivy.require('1.7.1')
@bkuri
bkuri / main.py
Last active December 25, 2015 11:09
My dashboard code. You need a layout file such as this one to load a sample set: https://gist.github.com/bkuri/6966975
#!/usr/bin/env python2
# -*- coding: utf-8 -*-
from kivy.animation import Animation
from kivy.app import App
from kivy.clock import Clock
from kivy.lang import Builder
from kivy.properties import ObjectProperty, StringProperty
from kivy.uix.floatlayout import FloatLayout
from gauge import Gauge
@bkuri
bkuri / no_rings.kv
Created October 13, 2013 20:19
sample kv layout file.
#:kivy 1.7.1
#:set bg [0.55,1,0.25,0.1]
#:set fg [0.55,1,0.25,1]
#:set font 'lib/fonts/envy_code_r_normal.ttf'
<Dashboard>:
gauges: big_bottom, big_top, small_bottom, small_mid_bottom, small_mid_top, small_top
Gauge:
area: 800, 400
#!/usr/bin/env python2
# -*- coding: utf-8 -*-
from config import *
from apiclient.discovery import build
from apiclient.errors import HttpError
from argparse import ArgumentParser
from httplib2 import Http
from oauth2client.client import flow_from_clientsecrets
from oauth2client.file import Storage
@bkuri
bkuri / server.coffee
Last active August 29, 2015 14:27
Fetch *all* slack IMs from a specific user and save them as a JSON file
#!/bin/coffee
_ = (require 'lodash')
fs = (require 'fs')
request = (require 'request')
vantage = (require 'vantage')()
FOLDER = '/tmp'
PORT = 8080
TOKEN = 'add your token here'
@bkuri
bkuri / tasks.tag.jade
Created November 19, 2015 07:14
This is my version of the todo-riot tag in jade. Not sure if line 25 works or not, but I tried running without it (and without the script tag) and it still didn't work.
tasks
task(each=data.tasks)
script(type='coffee')
@getMeteorData = ->
# If hide completed is checked filter tasks, otherwise return all of them
pattern = if (Session.get 'hideCompleted') then checked: $ne: yes else {}
tasks: (Tasks.find pattern, sort: createdAt: -1).fetch()
@mixin 'RiotMeteorData'
@bkuri
bkuri / script.coffeescript
Last active June 27, 2016 18:33 — forked from anonymous/script.coffeescript
weborama lightbox demo
swal
customClass: 'weborama-ad'
imageClass: 'weborama-ad-img'
imageWidth: 300
imageHeight: 300
imageUrl: 'http://clientsmedia2.adrime.com/9251124598/111733/bg_layer.jpg'
padding: 0
showCloseButton: yes
showConfirmButton: no
timer: 15000

Keybase proof

I hereby claim:

  • I am bkuri on github.
  • I am bkuri (https://keybase.io/bkuri) on keybase.
  • I have a public key whose fingerprint is 66BB BB1C 5BE6 4B9C 4259 C1CB 229F 43CD 875A 8599

To claim this, I am signing this object:

@bkuri
bkuri / index.pug
Created January 20, 2017 19:05
VelocityJS Modal
.screen
.body
button#open Modal
.layer
.content
span This is the content area
.overlay
button#close X
<TaskerData sr="" dvi="1" tv="5.4.5b">
<Task sr="task17">
<cdate>1355619832791</cdate>
<edate>1536877231833</edate>
<id>17</id>
<nme>Random quote</nme>
<pri>6</pri>
<Action sr="act0" ve="7">
<code>417</code>
<Str sr="arg0" ve="3">quotes.txt</Str>