This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## Download the pdf files of Ubuntu Magazine Japanese vol.3 | |
## (URL http://ubuntu.asciimw.jp/elem/000/000/010/10231/) | |
require 'open-uri' | |
BASE_URL = 'http://ubuntu.asciimw.jp/elem/000/000/010/10231/' | |
PDF_URL_REG = /href="(koukai\/.+?.pdf)"/ | |
OUT_DIR = 'ubumaga_vol3' | |
html_body = '' | |
open(BASE_URL, 'r') { |f| html_body = f.read } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
itunes_conv.js - iTunesの曲名を変換するスクリプト(Windows用) | |
[使い方] | |
(1) iTunesを開く | |
(2) 変換したい曲を選択(複数選択可) | |
(3) このスクリプトを実行(ファイルをダブルクリック | |
or コマンドプロンプトで wscript itunes_conv.js) | |
[参考] | |
http://www1.atwiki.jp/itunes/pages/26.html | |
http://d.hatena.ne.jp/prime503/20090914/1252883786 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
TextFieldとMinimalCompsのVScrollBarで手っ取り早く | |
日本語が使えるスクロールバー付きTextFieldを作るサンプル | |
(MinimalCompsのTextAreaのソースコードを参考にしています) | |
*/ | |
package { | |
import flash.display.Sprite; | |
import flash.text.TextField; | |
import flash.text.TextFieldType; | |
import flash.events.Event; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
CSV to Array using #include | |
*/ | |
#include <stdio.h> | |
int main(int argc, char *argv[]) | |
{ | |
/* echo '10,20,30,40,50' > hoge.csv */ | |
int hoge[] = { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* -*- mode: c; coding: utf-8-unix -*- */ | |
/* | |
Level set method | |
Build: | |
gcc `pkg-config --libs --cflags opencv` -pg levelset_method.c -o levelset_method | |
Usage: | |
./levelset_method imagefile | |
TODO: | |
・高速化 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdlib.h> | |
void merge_sort(int* data, int size); | |
void merge(int* data1, int size1, int* data2, int size2, int* result); | |
void merge_sort(int* data, int size) | |
{ | |
int size1, size2; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
# -*- mode: ruby; coding: utf-8-unix -*- | |
# Sudoku solver for Dropquest | |
# https://www.dropbox.com/dropquest2011/ | |
require 'pp' | |
CANDIDATES = 'AFERDOWSI'.split(//) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; AutoHotKey_LでEmacsキーバインドにするスクリプト | |
;; | |
;; 使い方 | |
;; ・AutoHotKey_L(http://l.autohotkey.net/)をインストール | |
;; ・Emacs.ahkをAutoHotkeyをインストールしたフォルダ(デフォルトならC:\Program Files\AutoHotkey)に保存 | |
;; ・タスクバーにあるAutoHotkeyのアイコン([H])を右クリックし、"Edit This Script"を選択 | |
;; ・メモ帳でAutoHotkey.ahkが開くので、最後に以下の行を追加 | |
;; #include Emacs.ahk | |
;; ・AutoHotkeyアイコンを右クリックして"Reload This Script"を選択してリロード | |
;; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# PowerShell Drag & Drop sample | |
# Usage: | |
# powershell -sta -file dragdrop.ps1 | |
# (-sta flag is required) | |
# | |
Function DragDropSample() { | |
[System.Reflection.Assembly]::LoadWithPartialName("System.Windows.Forms") | |
$form = New-Object Windows.Forms.Form | |
$form.text = "Drag&Drop sample" | |
$listBox = New-Object Windows.Forms.ListBox |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#compdef tmuxinator mux | |
# zsh completion for tmuxinator | |
# Install: | |
# $ mkdir -p ~/.tmuxinator/completion | |
# $ cp _tmuxinator ~/.tmuxinator/completion | |
# $ vi ~/.zshrc # add the following codes | |
# fpath=($HOME/.tmuxinator/completion ${fpath}) | |
# autoload -U compinit |
OlderNewer