Skip to content

Instantly share code, notes, and snippets.

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

yukpiz yukpiz

🐢
|ω・)و ̑̑༉
View GitHub Profile
@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!'
}
}
@yukpiz
yukpiz / syntax.vim
Created April 8, 2015 11:42
Get syntax type name of the cursor position.
echo synIDattr(synID(line('.'), col('.'), 0), 'name')
@yukpiz
yukpiz / pg_restore.sh
Created April 9, 2015 02:29
PostgreSQL database restore command.
#!/bin/sh
pg_restore -h {host} -d {database} -U {user} -p {port} backup.dmp
@yukpiz
yukpiz / cpp-in-vim.md
Last active October 14, 2023 07:46
Write C++ in Vim.

VimでC++を書く設定や操作

1. 設定の書き方