Skip to content

Instantly share code, notes, and snippets.

View yamachu's full-sized avatar
🚼
babu-mi

Yusuke Yamada yamachu

🚼
babu-mi
View GitHub Profile
@matchy256
matchy256 / rec_radiko.sh
Last active October 31, 2023 08:23 — forked from saiten/rec_radiko.sh
簡易Radiko録音スクリプト
#!/bin/bash
LANG=ja_JP.utf8
pid=$$
date=`date '+%Y-%m-%d-%H_%M'`
outdir="."
if [ $# -le 1 ]; then
@scturtle
scturtle / activity.py
Last active October 11, 2017 17:07
undocumented twitter activity api
# coding: utf-8
import oauth2 as oauth
import json
CONSUMER_KEY = "yT577ApRtZw51q4NPMPPOQ"
CONSUMER_SECRET = "3neq3XqN5fO3obqwZoajavGFCUrC42ZfbrLXy5sCv8"
ACCESS_KEY = ""
ACCESS_SECRET = ""
consumer = oauth.Consumer(key=CONSUMER_KEY, secret=CONSUMER_SECRET)
@TAK-EMI
TAK-EMI / CameraController.cs
Last active January 22, 2022 05:53
Unityでメタセコイアのようにカメラを操作できるようにするためのスクリプト。修正しました(古いのは残しておきます)。使用してるカメラにaddすればOK。マウスの右ドラッグでカメラ回転。中ドラッグで移動。ホイールでカメラが前後に移動。質問等あればこちらまでどうぞ。https://twitter.com/TAK_EMI
using UnityEngine;
using System.Collections;
// クラス名が被っているといけないので、namespaceで囲む
namespace TAK_CameraController
{
// マウスのボタンをあらわす番号がわかりにくかったので名前を付けた
enum MouseButtonDown
{
MBD_LEFT = 0,
@hihigash
hihigash / vmware_machine_settings.bat
Last active September 21, 2017 08:03
検証マシンのセットアップ時に使用する設定 (VMWare) for Windows 8.x
::
:: WINDOWS SETTINGS
::
:: キーボードの配列を英語配列にする
%SystemRoot%\System32\reg.exe ADD HKLM\SYSTEM\CurrentControlSet\Services\i8042prt\Parameters /v "LayerDriver JPN" /t REG_SZ /d kbd101.dll /f
%SystemRoot%\System32\reg.exe ADD HKLM\SYSTEM\CurrentControlSet\Services\i8042prt\Parameters /v "OverrideKeyboardIdentifier" /t REG_SZ /d PCAT_101KEY /f
%SystemRoot%\System32\reg.exe ADD HKLM\SYSTEM\CurrentControlSet\Services\i8042prt\Parameters /v "OverrideKeyboardSubtype" /t REG_DWORD /d 0 /f
%SystemRoot%\System32\reg.exe ADD HKLM\SYSTEM\CurrentControlSet\Services\i8042prt\Parameters /v "OverrideKeyboardType" /t REG_DWORD /d 7 /f
@faithfracture
faithfracture / boost.sh
Last active October 6, 2023 21:23
Boost build script for iOS (armv7, armv7s, arm64), iOS Simulator (i386, x86_64), and OSX (i386, x86_64)
#===============================================================================
# Filename: boost.sh
# Author: Pete Goodliffe
# Copyright: (c) Copyright 2009 Pete Goodliffe
# Licence: Please feel free to use this, with attribution
# Modified version
#===============================================================================
#
# Builds a Boost framework for iOS, iOS Simulator, and OSX.
# Creates a set of universal libraries that can be used on an iOS and in the
@takezoe
takezoe / DailyScala_PartialFunction.md
Created December 20, 2014 15:21
ScalaのPartialFunction

ScalaのPartialFunction

コレクションのcollectメソッド

コレクションのcollectメソッドについて考えてみる。

case class User(id: Int, name: String, isAdmin: Boolean)

val users: List[User] = List(

SPTKをWindows+MSVC環境にインストールする方法

前提: インストール先をC:\SPTKとする。

  1. 公式サイトからソースコード(例: SPTK-3.8.tar.gz)をダウンロード、任意の場所に展開し、ソースコードのフォルダを開く(例: C:\SPTK-3.8)。
  2. Makefile.makの1行目を編集し、C:\SPTK\binC:\SPTK 変更する(\binを削除する)。あるいは、任意のパスを指定すると、そのフォルダにインストールされる。
  3. Visual Studioの x86 Native Tools コマンドプロンプト管理者権限で起動し、C:\SPTK-3.8 に移動する。x64版ではコンパイルできなかった。
  4. unistd.h が無いため、どこかから拾ってきて C:\SPTK-3.8\include\unistd.h を作成する。例えば、Win7 64bit, MSVS2013なら このリンク先からコピペする のでもコンパイルできた。
  5. 以下のコマンドを、順番に実行し、エラーが出なれけばインストール完了。
nmake /f Makefile.mak
@JonDouglas
JonDouglas / xamarinandroidbindings.md
Last active March 12, 2024 10:36
Xamarin Android Bindings Troubleshooting

Approaching a Xamarin.Android Bindings Case

1. Investigation

One of the best ways to investigate a problematic Xamarin.Android Binding is to first ensure you have the proper tooling available:

Binding Java 8 Interfaces from C♯

Help wanted! :-)

Background

Xamarin.Android binds the Android Java API, which means that all Java language features need to be "bound" to corresponding C# language features. For many language constructs, this binding is simple, e.g. type names are (usually) unchanged and identical, while other language features are changed in subtle