Skip to content

Instantly share code, notes, and snippets.

View yukpiz's full-sized avatar
🐢
|ω・)و ̑̑༉

yukpiz yukpiz

🐢
|ω・)و ̑̑༉
View GitHub Profile
@yukpiz
yukpiz / english.py
Last active August 29, 2015 14:18
Convert number to English word with Python code.
#-*- encoding:utf-8 -*-
#words: 除算用の英単語辞書
words = {
1000000000: 'Billion',
1000000: 'Million',
1000: 'Thousand',
100: 'Handred',
90: 'Ninety',
80: 'Eighty',
@yukpiz
yukpiz / android_create_project.sh
Last active August 29, 2015 14:18
Create Android project command for Gradle.
android create project -n {name} -t {target-id} -g -v {gradle-version} -p {path} -k {package} -a {activity}
@yukpiz
yukpiz / android-studio
Created April 2, 2015 06:18
Execute Android Studio command.
#!/bin/sh
$ANDROID_STUDIO_BIN/studio.sh
@yukpiz
yukpiz / jetbrains-android-studio.desktop
Created April 2, 2015 07:19
This file is order to register to launcher.
[Desktop Entry]
Encoding=UTF-8
Version=1.0
Type=Application
Name=Android Studio
Icon=/usr/local/share/android-studio/bin/androidstudio.ico
Path=/usr/local/share/android-studio/bin
Exec=/usr/local/share/android-studio/bin/studio.sh
StartupNotify=false
StartupWMClass=jetbrains-android-studio
@yukpiz
yukpiz / default.log
Created April 3, 2015 06:46
Vim startup time log.
times in msec
clock self+sourced self: sourced script
clock elapsed: other lines
000.018 000.018: --- VIM STARTING ---
000.224 000.206: Allocated generic buffers
000.500 000.276: locale set
000.569 000.069: GUI prepared
@yukpiz
yukpiz / dijkstra.py
Last active August 29, 2015 14:18
Dijkstra algorithm.
nodes = {
"A": ["", ""],
"B": ["", ""],
"C": ["", ""],
"D": ["", ""],
}
connects = [
["A", "B", "10"],
["B", "C", "10"],
@yukpiz
yukpiz / python_gtk.py
Last active August 29, 2015 14:18
Using the gtk from Python.
import gtk
class GtkTutorial:
def __init__(self):
#GTK Window
self.window = gtk.Window(gtk.WINDOW_TOPLEVEL)
self.window.set_border_width(1)
self.window.set_title('Tutorial')
self.window.set_default_size(1024, 768)
@yukpiz
yukpiz / pg_dump.sh
Created April 6, 2015 03:44
PostgreSQL database dump command.
#!/bin/sh
pg_dump -h {host} -d {database} -U {user} -p {port} -w -Fc -b > {file}
@yukpiz
yukpiz / bash256
Created April 6, 2015 11:56
bash 256 colors.
#!/bin/bash
for i in {0..255}; do
if [ $((${i} % 8)) -eq 0 ]; then
printf '\n'
fi
printf "\x1b[38;05;${i}m [38;05;%03dm" ${i}
done
printf '\n'
@yukpiz
yukpiz / build.gradle
Created April 8, 2015 05:03
Hello world of the gradle script.
task hello {
doLast {
println 'Hello world!'
}
}