Skip to content

Instantly share code, notes, and snippets.

View kinow's full-sized avatar
💭
😬

Bruno P. Kinoshita kinow

💭
😬
View GitHub Profile
git config --global user.email "[email protected]"
git config user.name "Billy Everyteen"
git config --global push.default simple
git config --global core.autocrlf input
@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
" size of a hard tabstop
set tabstop=4
" size of an "indent"
set shiftwidth=4
" combination of spaces and tabs are used to simulate tab stops at width
" other than the (hard)tabstop
set softtabstop=4
@kinow
kinow / r001.r
Last active January 29, 2016 10:37
BioUno eResearchNZ R gist
# taxize
library('taxize')
library('brranching')
taxa <- c("Poa annua", "Phlox diffusa", "Helianthus annuus")
tree <- phylomatic(taxa=taxa, storedtree = "R20120829")
png(filename = "taxize_plot_01.png", width = 480, height = 480)
plot(tree)
dev.off()
# antweb
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Database SPARQL Plugin 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.4.1:clean (default-clean) @ database-sparql ---
[INFO] Deleting /home/kinow/Development/java/biouno/database-sparql-plugin/target
[INFO]
[INFO] >>> maven-hpi-plugin:1.106:run (default-cli) @ database-sparql >>>
@kinow
kinow / linux_tips.md
Created September 23, 2015 22:22
Linux tips

##Grep for content within XML tags

grep -oP "(?<=<bla:Username>).*?(?=</bla:Username>)" app/logs/test.curl.log

Search for strings in Jenkins jobs

for x in ls -d */; do grep -r -H "srv" ${x}/workspace >> /tmp/srv; done

List packages in SLES and origin repo

def options = [];
if (PROJECT == 'A') {
options << 'proj1-A';
options << 'proj2-A';
} else if (PROJECT == 'B') {
options << 'proj1-B';
options << 'proj2-B';
options << 'proj3-B';
options << 'proj4-B';
@kinow
kinow / review-jena-notice-license.sh
Last active August 29, 2015 14:25
review-jena-notice-license.sh
#!/bin/bash
# requirements: bash shell (not posix), tr, find, grep
BASEDIR=$(dirname $0)
YEAR=$(date +%G)
JENA_HOME=$(pwd -P $BASEDIR)
if [[ ! -z "$1" ]]
then
JENA_HOME=$1
@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