Skip to content

Instantly share code, notes, and snippets.

View ueno1969's full-sized avatar

Kazuhiko UENO ueno1969

View GitHub Profile
@ueno1969
ueno1969 / README.md
Last active June 14, 2024 10:57
TestAILZ80ASM

AZ80ASMのコンパイル時間テスト用

// Use JDK 17 preview
public class Main {
public static void main(String[] args) {
new Main().sample();
new Main().sample2();
}
private static Result<Integer, RuntimeException> parse(String a) {
try {
@ueno1969
ueno1969 / Dockerfile
Last active April 6, 2022 02:42
AWS cliとcopilotとセッションマネージャーを入れたDockerfile
FROM amazon/aws-cli
RUN curl -Lo copilot https://github.com/aws/copilot-cli/releases/latest/download/copilot-linux && \
chmod +x copilot &&\
mv copilot /usr/local/bin/copilot
RUN curl "https://s3.amazonaws.com/session-manager-downloads/plugin/latest/linux_64bit/session-manager-plugin.rpm" -o "session-manager-plugin.rpm" && \
yum install -y ./session-manager-plugin.rpm && \
rm ./session-manager-plugin.rpm
@ueno1969
ueno1969 / display4.asm
Created March 5, 2022 06:28
PC 8001 Z80 カラードットスクロール 処理部
;==============================
; 描画関連
;==============================
initVram:
ld hl, Vram.topAddr2
ld (NextVramAddr), hl
ret
@ueno1969
ueno1969 / Readme.md
Last active January 26, 2023 08:38
pountctl support

使い方

一覧表示

pctrl.sh l

無効化

pctrl.sh d [parameters]

@ueno1969
ueno1969 / poundctrl_show.sh
Created July 31, 2017 05:10
poundctrlの表示を1行に並べる
sudo /usr/local/pound/sbin/poundctl -c /var/run/pound/poundctl.socket -H |awk '
/^ [ 0-9]*\. http Listener/ {l=$1}
/^ [ 0-9]*\. Service/ {m=$1}
/^ [ 0-9]*\. Backend/ {s = l""m""$0; gsub(/[ .]+/, " ", s); print s }
'
@ueno1969
ueno1969 / file0.rb
Created June 24, 2016 06:42
Ruby の case でワイルドカードのようなのが欲しい ref: http://qiita.com/Ueno1969/items/3e0e5dbd8a464ace369a
_ = Object.new
def _.==(obj)
true
end
[ ["a", 1], ["a", 2], ["b", 1], ["b", 2], ["c", 1], ["c", 3] ].each do |v|
pattern = case v
when ["a", 1 ] then "a,1"
when ["a", _ ] then "a,*"
@ueno1969
ueno1969 / file2.txt
Created January 25, 2015 09:51
"翔べ!ガンダム"をrubyで書いてみた ref: http://qiita.com/Ueno1969/items/e37a83a6518ad99fea14
ガンダムは燃え上がる
ガンダムは燃え上がる
ガンダムは燃え上がる
ガンダムは走る
ガンダムは巨大な敵を撃つ
ガンダムは巨大な敵を撃つ
ガンダムは巨大な敵を撃つ
ガンダムは正義の怒りをぶつける
機動戦士 ガンダム ガンダム
p
= link_to("test link", '/?x=1&y=2')
p
== link_to("test link2", '/?x=1&y=2')
p
= link_to("test link3", :href => '/?x=1&y=2')
p
= link_to("test link4", '/?x=1&y=2'.html_safe)
@ueno1969
ueno1969 / gist:3951372
Created October 25, 2012 08:16
Androidアプリをantでビルドするとき、パスワードの入力を隠す方法
パスワードをコマンドラインで入力するようにして、普通に ant release したら、入力したパスワードがコンソールに表示されたので、それを隠す方法
-----------------------------------------------------
build.xmlに以下を追加。
android SDKのtools/ant/build.xmlの一部を修正して、プロジェクトのbuild.xmlに追加
<target name="-release-prompt-for-password" if="has.keystore" unless="has.password">
<input