Skip to content

Instantly share code, notes, and snippets.

View mj-hd's full-sized avatar
💯
Flutter Engineer

Yusuke Otsuka mj-hd

💯
Flutter Engineer
View GitHub Profile
@mj-hd
mj-hd / hdl_keyword_extractor.rb
Created May 19, 2015 08:02
HDLキーワード抽出スクリプト(Ruby)
#!/usr/bin/ruby
#
# 2015/5/19
#
# hdl_keyword_extractor
# by mjhd <mjhd@devlion.net>
#
# 使い方:
# hdl_keyword_extractor.rb <HDLのデータベースファイル>
#
@mj-hd
mj-hd / private.xml
Last active August 29, 2015 14:23
JISキーボードをUSキーボードとして使ってるユーザ向けの、Karabinerで、Parallels上で英数/かなキーをShift+Ctrl+F11/F12へ割り当てるprivate.xml
<?xml version="1.0"?>
<root>
<list>
<item>
<name>個人用</name>
<item>
<name>英数/かなをVirtualMachineでCtrl+Shift+F11/F12として使う</name>
<identifier>remap.jis_eisuukana_to_us_virtualmachine</identifier>
<only>VIRTUALMACHINE</only>
<autogen>__KeyToKey__ KeyCode::JIS_EISUU,
@mj-hd
mj-hd / db_migrate.go
Created June 26, 2015 15:26
HSP部屋データベース移行
package main
import (
"bytes"
"database/sql"
"encoding/gob"
"fmt"
"time"
"github.com/go-sql-driver/mysql"
@mj-hd
mj-hd / decrypt.php
Created August 14, 2015 20:07
Brute-force attack for php's crypt
<?php
$hash = "encrypted hash";
$salt = "salt";
$digits = 8;
$thread_n = 4;
$threads = [];
for ($i = 0; $i < $thread_n; $i++) {
$threads[$i] = new AttackThread($i, $thread_n, $hash, $salt, $digits);
@mj-hd
mj-hd / checker.hsp
Created August 25, 2015 14:17
Checker Pattern
#include "hsp3dish.as"
#const CELL_SIZE 50
// 初期化
screen 0, 640, 480
dim col, 2, 3
col(0, 0) = 0:col(0,1) = 0:col(0,2) = 0
Process: Xcode [8433]
Path: /Applications/Xcode.app/Contents/MacOS/Xcode
Identifier: com.apple.dt.Xcode
Version: 7.0 (8227)
Build Info: IDEFrameworks-8227000000000000~2
App Item ID: 497799835
App External ID: 813293765
Code Type: X86-64 (Native)
Parent Process: ??? [1]
Responsible: Xcode [8433]
/* from http://forums.xamarin.com/discussion/comment/149607 */
using System;
using Android.Content;
using Android.Runtime;
using Android.Text;
using Android.Widget;
using Android.Util;
using Android.Graphics;
using Java.Lang;
/* from http://forums.xamarin.com/discussion/comment/149607 */
using System;
using Android.Content;
using Android.Runtime;
using Android.Text;
using Android.Widget;
using Android.Util;
using Android.Graphics;
using Java.Lang;
@mj-hd
mj-hd / uumail.rb
Last active November 22, 2016 01:25
uumailを監視し新着メールが届くと、指定したメールアドレスにその件数を通知するスクリプト
#!/usr/bin/env ruby
# coding: utf-8
# uumail新着メール通知スクリプト
# 事前にgem install mechanize mailを実行しておく必要あり。
# 24時間動かすことを前提とする。別途supervisordなどで動かすと扱いやすい。
require "mechanize"
require "mail"
#module
// 2進数の文字列へ変換
// デバッグ用
#defcfunc bit int a, local res
res = ""
repeat 32
poke res, 31 - cnt, $30 + ((a >> cnt) & 1)
loop
return res