Skip to content

Instantly share code, notes, and snippets.

View kinow's full-sized avatar
💭
😬

Bruno P. Kinoshita kinow

💭
😬
View GitHub Profile
@kinow
kinow / keys.txt
Created May 7, 2016 11:53
Note to remember how to check jar keys
Download jars and asc files.
Then check the files:
for x in *.jar; do gpg --verify "${x}".asc; done
Import the key if necessary
gpg --keyserver pgpkeys.mit.edu --recv-key $KEY
#!/usr/bin/env python
# @see http://www.andrewnoske.com/wiki/Unix_-_ncurses_ui
# my_first_ncurses_menu_ui.py - simple interactive command line
# program generated using 'ncurses ui'.
# This example has four options:
# > option 1: prompts for more input
# > option 2&3: execute basic bash commands.
# > option 4: exits back to bash prompt.
# This can be a good base to build a more sophisticated interative program.
@kinow
kinow / monitors_work.sh
Created August 4, 2016 21:34
monitors_work.sh
#!/bin/bash
xrandr --output eDP1 --mode 1368x768 --output DP1-2 --right-of eDP1 --auto --output DP1-1 --left-of eDP1 --auto
exit 0
@kinow
kinow / gist:ff6a3e33e094a17be70246ad4ece86e3
Created August 20, 2016 01:49
Release jenkins plugin with maven
JAVA_HOME=/usr/lib/jvm/java-7-oracle/ mvn org.apache.maven.plugins:maven-release-plugin:2.5:prepare
@kinow
kinow / test_tap.sh
Created August 31, 2016 06:56
Creating random TAP files
#!/bin/bash
r=$(( RANDOM%10 ))
for ((i=1; i<=r; i++)); do
echo "Creating file result_$i.tap"
cat > "result_$i.tap" <<EOF
1..1
ok 1
EOF
public static void main(String[] args) {
int accumulator = 0;
byte b = 0;
int nbBitsUsed = 100;
/* classic version */
while (nbBitsUsed >= 8) { /* each while test is a branch */
accumulator <<= 8;
accumulator += b++;
nbBitsUsed -= 8;
}
@kinow
kinow / composer
Created September 1, 2016 13:25
Composer without xdebug
#!/bin/bash
options=$(ls -1 /usr/lib/php/20151012/ | \
grep --invert-match xdebug| \
# remove problematic extensions
egrep --invert-match 'mysql|wddx|pgsql|opcache'| \
sed --expression 's/\(.*\)/ -d extension=\1/'| \
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-2spdv72w/mecab-python3/
install
sudo apt-get install mecab -y
sudo apt-get install libmecab-dev -y
sudo apt-get install mecab mecab-ipadic-utf8 -y
pip install mecab-python3
@kinow
kinow / gist:4cde796cc6093a0d6fd2c79c6ce71d1b
Created December 22, 2016 02:17
Threaded upload to S3
121 MB
default: 10
00:00:04.581
1 thread
00:00:11.699
2 threads
00:00:07.894
@kinow
kinow / krita_build.sh
Created January 1, 2017 22:38
Build krita for Eclipse CMAKE
#!/bin/bash
cmake -G "Eclipse CDT4 - Unix Makefiles" ../krita -DCMAKE_INSTALL_PREFIX=/home/kinow/Development/cpp/workspace/krita_install/ -DWITH_GMIC=ON -DCMAKE_BUILD_TYPE=RelWithDebInfo -DPRODUCTSET=ALL -DPACKAGERS_BUILD=ON -DBUILD_TESTING=OFF -DKDE4_BUILD_TESTS=OFF
make
exit 0