Skip to content

Instantly share code, notes, and snippets.

View unok's full-sized avatar

Kazuhiko UNO unok

View GitHub Profile
@unok
unok / gist:28e62292e4c936376975994b0ae83612
Created May 29, 2024 09:18
Sytle & Genre List - Suno.wiki
## Style
#### Danceable
- Dance: ダンス音楽。踊りやすいリズムとビートが特徴。
- Festive: 祝祭的な音楽。お祝いの場で演奏されることが多い。
- Groovy: グルーヴィーな音楽。リズムが心地よく、体を動かしたくなる感じ。
- Mid-Tempo: 中程度のテンポ。速すぎず遅すぎないリズム。
- Syncopated: シンコペーション。リズムがずれている感じで、独特のビートを生む。
- Tipsy: ほろ酔い気分の音楽。リラックスした雰囲気。
@unok
unok / f20.ahk
Last active April 21, 2024 02:06
F20 + key combination
#Requires AutoHotkey v2.0
;-----------------------------------------------------------
; 設定内容
;
; Ctrl-u IME OFF
;
; F20 + ` Escape
; F20 + 1 F1
; F20 + 2 F2
; F20 + 3 F3
@unok
unok / j2r.txt
Created March 7, 2016 03:15
日本語を無理矢理ローマ字に変換
# from http://law.e-gov.go.jp/htmldata/S21/S21KE000.html
2016/03/07 12:15:23
NIPPONKOKUKEMPO
( SHOWA FUTA TOICHI NEN> JUICHIGATSU MIKA KEMPO )
NIHONKOKUMIN HA, SEITO NI SENKYO SARETA KOKKAI NIOKERU DAIHYOSHA O TSUJI TE KODO SHI,WARERATOWARERANO SHISON NOTAMENI, SHOKOKUMIN TONO KYOWA NIYORU SEIKA TO, WAGAKUNI ZENDO NIWATATSUTE JIYU> NOMOTARASU KEITAKU O KAKUHO SHI, SEIFU NO YU TAMENI YOTSUTE FUTATABI SENSO NO SANKA GA OKO RUKOTONONAIYAUNISURUKOTO KETSUI SHI,KOKONI SHUKEN GA KUNITAMI NI NAGA SURUKOTO SENGEN SHI,KONO KEMPO O KAKUTEI SURU.SOMOSOMO KUNIMASA HA, KUNITAMI NO GENSHUKU NA SHINTAKU NIYORUMONODEATSUTE,SONO KENI HA KUNITAMI NI YURAI SHI,SONO KENRYOKU HA KUNITAMI NO DAIHYOSHA GAKOREO KOSHI SHI,SONO FUKURI HA KUNITAMI GAKOREO KYOJU SURU.KOREHA JINRUIFUHEN NO GENRI DEARI,KONO KEMPO HA,KAKARU GENRI NI MOTO KUMONODEARU.WARERAHA,KORENI HON SURU HITOKI NO KEMPO , HOREI OYOBI SHOCHOKU O HAIJO SURU.
NIHONKOKUMIN HA, KOKYU NO HEIWA O NENGAN SHI, JINKAN SOGO NO KANKEI O SHIHAI SURU SUKO NA RISO O MI KU JIKAK
<?php
class TasteCake {
function TasteCake() {
$this->__initConstants();
$this->__bootstrap();
App::uses('ClassRegistry', 'Utility');
App::uses('Dispatcher', 'Routing');
App::uses('Router', 'Routing');
# first が nil の場合 id が method が見つからないエラーになる
User.where(age: 20).first.id
@unok
unok / search.sh
Last active August 29, 2015 14:07
fulltext search :)
#!/bin/sh
if [ "$1" == "" ]; then
echo "USAGE: $0 search_arg [search_arg]..."
exit 1
fi
CMD="grep -R -l \"$1\" *"
shift
while [ "$1" != "" ]
do
CMD="$CMD | xargs grep -l \"$1\""
@unok
unok / gist:85656d998059433501f0
Created July 11, 2014 09:59
文字コードテスト用の文字サンプル
!"#$%&'()*+,-./
0123456789
:;<=>?
ABCDEFGHIJKLMNOPQRSTUVWXYZ
[\]^_`
abcdefghijklmnopqrstuvwxyz
{|}~。「」
、・ヲァィゥェォャュョッ
ーアイウエオカキクケコサシスセソ
タチツテトナニヌネノハヒフヘホマ
@unok
unok / .gitconfig
Created February 14, 2014 06:49
gitconfig for intellij merge tool
[merge]
tool = intellij
[mergetool "intellij"]
cmd = /Applications/IntelliJ\\ IDEA\\ 13.app/Contents/MacOS/idea merge $(cd $(dirname "$LOCAL") && pwd)/$(basename "$LOCAL") $(cd $(dirname "$REMOTE") && pwd)/$(basename "$REMOTE") $(cd $(dirname "$BASE") && pwd)/$(basename "$BASE") $(cd $(dirname "$MERGED") && pwd)/$(basename "$MERGED")
trustExitCode = true
[diff]
tool = intellij
[difftool "intellij"]
cmd = /Applications/IntelliJ\\ IDEA\\ 13.app/Contents/MacOS/idea diff $(cd $(dirname "$LOCAL") && pwd)/$(basename "$LOCAL") $(cd $(dirname "$REMOTE") && pwd)/$(basename "$REMOTE")
@unok
unok / remove_duplicate_path
Created June 3, 2013 08:36
PATH の中の重複したパスを削除する。どこかでひろってきたのをそのまま利用w
function remove_duplicate_path(){
eval "export PATH=$(perl -e ' #\
my $e = shift; #\
for(split q/:/, $ENV{"PATH"}){ #\
if("$_" ne "" && -e "$_"){ #\
$n{$_} or $n{$_} = ++$i; #\
} $\
} #\
$, = q/:/; #\
%n = reverse %n; #\
@unok
unok / cakeunit4phpstorm.php
Last active December 14, 2015 13:48
とりあえずローカルのテストが動くように修正(動作環境 IDEA EAP 128.18)
<?php
chdir(dirname(__FILE__));
// Clean argument values
$phpStormRunner = null;
$cleanedArgv = array();
foreach ($_SERVER['argv'] as $key => $value) {
if (strpos($value, 'ide-phpunit.php') === false) {
$cleanedArgv[] = $value;