Skip to content

Instantly share code, notes, and snippets.

View kinow's full-sized avatar
💭
😬

Bruno P. Kinoshita kinow

💭
😬
View GitHub Profile
#!/usr/bin/env bash
## Alias GAuth to copy current to clipboard
function gauth() {
[ ! -z "${1}" ] && {
/Users/$(whoami)/go/bin/gauth |grep -i "aws ${1}" |sed 's/AWS //' |awk '{print$3}' |pbcopy
echo -e "Copied $(pbpaste) clipboard!"
} || {
/Users/$(whoami)/go/bin/gauth
}
@kinow
kinow / thesession.py
Created March 25, 2016 10:23 — forked from mynameisfiber/thesession.py
thesession.org ABC file scraper
#!/usr/bin/env python2.7
"""
Scrape thesession.org for all the yummy ABC files
"""
import os
import itertools as IT
from collections import deque
from operator import itemgetter
from urlparse import urljoin
@kinow
kinow / build.xml
Last active August 29, 2015 14:23 — forked from hectorsanjuan/build.xml
<?xml version="1.0" encoding="UTF-8"?>
<project name="${projectName}" basedir="." default="build:main">
<!-- Properties -->
<property name="dir.app" value="${project.basedir}/app" />
<property name="dir.src" value="${project.basedir}/src" />
<property name="dir.build" value="${project.basedir}/app/build" />
<property name="dir.docs" value="${dir.build}/docs" />
<property name="dir.docs.phpdoc" value="${dir.docs}/phpdoc" />
<property name="dir.docs.docblox" value="${dir.docs}/docblox" />
<property name="dir.reports" value="${dir.build}/logs" />
@kinow
kinow / telegram.lua
Last active August 29, 2015 14:20 — forked from randrews/telegram.lua
function load_dictionary(filename)
local dictionary = {}
for line in io.lines(filename) do
if line:match("^%l%l+$") then
insert(dictionary, line .. "$")
end
end
-- We're cutting all single-letter words, but
public static void main(String[] args) throws DatabaseException,
UnsupportedEncodingException {
DatabaseEntry key = new DatabaseEntry();
DatabaseEntry data = new DatabaseEntry();
EnvironmentConfig config = new EnvironmentConfig();
config.setAllowCreate(true);
config.setTransactional(true);
@kinow
kinow / flame.lua
Created October 15, 2013 01:24 — forked from joshski/flame.lua
-- a little flame in a functional style
function particle(step, style, t)
local newStyle = step(style, t)
return {
style = newStyle,
next = function()
return particle(step, newStyle, t + 1)
end
}
@kinow
kinow / pr.md
Created September 8, 2013 15:05 — forked from piscisaureus/pr.md

Locate the section for your github remote in the .git/config file. It looks like this:

[remote "origin"]
	fetch = +refs/heads/*:refs/remotes/origin/*
	url = git@github.com:joyent/node.git

Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:

@kinow
kinow / rc.d
Created May 3, 2013 13:57 — forked from jippi/rc.d
update-rc.d logstash-shipper defaults
update-rc.d logstash-reader defaults
####################################
# BASIC REQUIREMENTS
# http://graphite.wikidot.com/installation
# http://geek.michaelgrace.org/2011/09/how-to-install-graphite-on-ubuntu/
# Last tested & updated 10/13/2011
####################################
cd
sudo apt-get update
sudo apt-get upgrade
@kinow
kinow / blog.md
Created February 28, 2013 19:44 — forked from aslakknutsen/blog.md

When you do your first Sonar run on your project, you get a lot of new quality numbers to play with, but no trends. You only have one data set for comparison, the now picture.

Wouldn't it be nice if you could see the current trend of the project without waiting a couple of month for the 'daily/weekly' Sonar runs to fill up the data? Well, you're in luck! And if you're using git as a version system as well, this is your day. :)

In the Sonar Advanced Parameter documentation you will find a System Property called sonar.projectDate. The property let you tell Sonar when in time the running analysis was ran.

By combining this property and what your version system does best, track changes to source, we can now play back the history of the project as far as Sonar is concerned.

This little Bash script illustrates the concept. To spell out what it does in human readable form: