Skip to content

Instantly share code, notes, and snippets.

View kbutti's full-sized avatar

kbutti kbutti

View GitHub Profile
@kbutti
kbutti / Form1.cs
Created December 6, 2020 13:03
クリップボードを監視して標準出力に出力してく感じの
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.Runtime.InteropServices;
@kbutti
kbutti / mozc-installer-for-centos6_x-i386.sh
Created October 5, 2015 08:23
Google 日本語入力を CenOS 32bit にインストールする
# Install the mozc (google-japanese-input) into CentOS i386
# http://b.hatena.ne.jp/entry/y-stream.blogspot.com/2015/05/centos-mozc.html
wget http://ftp.jaist.ac.jp/pub/Linux/Vine/Vine-6.0/i386/Vine/RPMS.main-dvd/protobuf-2.3.0-3vl6.i686.rpm
wget http://ftp.jaist.ac.jp/pub/Linux/Vine/Vine-6.0/i386/Vine/RPMS.main-dvd/zinnia-0.06-3vl6.i686.rpm
wget http://ftp.jaist.ac.jp/pub/Linux/Vine/Vine-6.0/i386/Vine/RPMS.main-dvd/tegaki-zinnia-japanese-0.3-1vl6.noarch.rpm
wget http://ftp.jaist.ac.jp/pub/Linux/Vine/Vine-6.0/i386/Vine/RPMS.main-dvd/ibus-mozc-1.1.717.102-2vl6.i686.rpm
wget http://ftp.jaist.ac.jp/pub/Linux/Vine/Vine-6.0/i386/Vine/RPMS.main-dvd/mozc-1.1.717.102-2vl6.i686.rpm
wget http://ftp.jaist.ac.jp/pub/Linux/Vine/Vine-6.0/i386/Vine/RPMS.main-dvd/mozc-server-1.1.717.102-2vl6.i686.rpm
wget http://ftp.jaist.ac.jp/pub/Linux/Vine/Vine-6.0/i386/Vine/RPMS.main-dvd/mozc-utils-gui-1.1.717.102-2vl6.i686.rpm
@kbutti
kbutti / bin2file.cpp
Last active May 2, 2019 12:56
セキュリティ・キャンプ全国大会2015 応募用紙 選択問題11 解析手順、および解析対象のファイルを出力するプログラム
// セキュリティ・キャンプ全国大会2015 応募用紙
// 選択問題11「下記バイナリを解析し、判明した情報を自由に記述してください」から引用
// https://www.ipa.go.jp/files/000045804.txt
// 解析手順
//
// g++ bin2file.cpp && a.exe
//
// file q11.bin
// => q11.bin: tcpdump capture file (little-endian) - version 2.4 (Ethernet, capture length 262144)
@kbutti
kbutti / 個別にRAR圧縮.bat
Created September 2, 2015 10:40
個別にRAR圧縮.bat
echo off
:loop
if "%~n1"=="" goto end
cd /d %~dp0
"C:\Program Files\WinRAR\WinRAR.exe" A -RR3P -EP1 -M3 -TSC0 -TSA0 -xThumbs.d? -x*.bak "%~dp0\%~n1" %1
echo %1
shift
goto loop
@kbutti
kbutti / 個別にZIP圧縮.bat
Last active September 2, 2015 10:39
個別にZIP圧縮.bat
echo off
:loop
if "%~n1"=="" goto end
cd /d %~dp0
"C:\Program Files\WinRAR\WinRAR.exe" A -afzip "%~dp0\%~n1" %1
echo %1
shift
goto loop
@kbutti
kbutti / ctf_tr_str.c
Created July 12, 2015 16:11
CTF で文字列を数文字ズラす系の問題が出たとき用のサンプルコード
#include <stdio.h>
#include <string.h>
int main(int argc, char* argv[])
{
static char s[] = "encrypted_phrase";
size_t len = strlen(s);
int i;
for (i = 0; i < len; i++)
@kbutti
kbutti / paiza_jp_poh_enkoi.rb
Last active October 12, 2017 02:41
エンジニアでも恋がしたい!~転職初日にぶつかった女の子が同僚だった件~ 回答例
# エンジニアでも恋がしたい!~転職初日にぶつかった女の子が同僚だった件~
# パイザオンラインハッカソン4・Lite エン恋
# https://paiza.jp/poh/enkoi
# Q1
total = 0
total_line = gets.chomp.to_i
total_line.times do
m = gets.chomp
@kbutti
kbutti / Log.java
Created March 2, 2013 19:59
Logger (Log class) for Doja v1.0
package p.util;
import p.Launch;
import com.nttdocomo.lang.MemoryManager;
/**
* デバッグ出力機能を提供します。
*/
@kbutti
kbutti / gist:5072996
Created March 2, 2013 19:56
ArrayList for Doja v1.2
package p.util;
import p.struct.Cloneable;
/**
* Doja(iアプリ環境)用の高速な挿入・削除を行う動的配列クラス。
* 配列内に加えられた要素の順序は保証されません。
* 具体的にはremoveAt() 実行後に addElement() を呼び出すと、新しい要素は削除された要素の位置に配置されます。
*
* @author niffy(http://niffy67.blog110.fc2.com/) + kbutti
#osak先生の数当てゲーム 普通の生徒用 TAの模範解答
$score = 0;
while(){
for($i=0; $i<=3; ++$i){
$rnd[$i] = int(rand(99));
}
@rnd = sort @rnd;
print "Input 0..99 number->";