Skip to content

Instantly share code, notes, and snippets.

View yukirii's full-sized avatar
✈️

Yuki Kirii yukirii

✈️
View GitHub Profile
@yukirii
yukirii / homesharing_via_vpn.sh
Created November 26, 2013 03:56
iTunes HomeSharing via VPN
#!/bin/bash
ssh -L 36890:127.0.0.1:3689 -N [email protected] -g &
sleep 3
trap "kill $!" SIGINT SIGHUP SIGTERM
dns-sd -P "iTunes Shared over VPN" _daap._tcp local 36890 localhost.local. 127.0.0.1
// displaysleep
//
// Command to Sleep Display OSX
// http://stackoverflow.com/questions/1239439/command-to-sleep-display-osx
//
// Compile: gcc -o displaysleep -framework CoreFoundation -framework IOKIT displaysleep.c
//
#include <CoreFoundation/CoreFoundation.h>
#include <IOKit/IOKitLib.h>
@yukirii
yukirii / 01_kumikomiOS.md
Last active April 21, 2018 05:36
情報システム実験 組み込みオペレーティングシステム 環境構築メモ

[K-13] 情報システム実験 : 組み込みオペレーティングシステム 環境構築

Mac OS X 10.9.2 で、主専攻実験の GBA 開発環境を構築した際のメモ。

なにか間違ってたらごめんなさい (╹◡╹ )

ARM 開発環境

TA さんの非公式マニュアルを参考に devkitPro なるものをインストールした。

devkitARMupdate.pl を実行し、指示に従って環境変数を設定。

@yukirii
yukirii / index.html
Created October 11, 2014 16:37
WebSocket sample
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/2.1.0/jquery.min.js"></script>
<script>
var ws = new WebSocket("ws://localhost:7070");
ws.onopen = function() {
console.log("connected WebSocket server");
}
@yukirii
yukirii / create_iso_img.sh
Created April 10, 2015 15:04
OS X でカレントディレクトリ以下のディレクトリを ISO(UDF) 化する
#!/bin/bash
files="`pwd`/*"
for filepath in $files; do
if [ -d $filepath ]; then
basename=$(basename $filepath)
echo "Create ISO file... ${basename}.iso"
hdiutil makehybrid -udf -o $basename $basename
fi
done
@yukirii
yukirii / gist:f323fd5a084a281c9557
Created September 16, 2015 08:26
Product Name
$ sudo /usr/sbin/dmidecode -t system | grep "Product Name"
Product Name: KVM
@yukirii
yukirii / TvRock の録画開始終了を Slack に Post する
Last active January 23, 2016 07:03
TvRock の録画開始/終了を Slack に Post する (参考: http://qiita.com/seya128/items/f5ceb7abac3d158304b6)
CS: C:\dtv\postslack\postslack.bat "[%h 録画開始] %d (%i/%j-%k-%l) - %g"
CE: C:\dtv\postslack\postslack.bat "[%h 録画終了] %d (%i/%j-%k-%l) - %g"
module.exports = (robot) ->
botId = robot.adapter.client.getUserByName('mybot').id
robot.adapter.client?.on? 'raw_message', (msg) ->
if msg['type'] != 'reaction_added' && msg['type'] != 'reaction_removed'
return
if msg['item_user'] == botId && msg['type'] == 'reaction_added'
reaction = msg['reaction']
channel = msg['item']['channel']
sudo yum install -y epel-release
sudo yum -y install erlang

## install rabbitmq
sudo yum install -y socat
sudo rpm --import http://www.rabbitmq.com/rabbitmq-signing-key-public.asc
sudo rpm -Uvh http://www.rabbitmq.com/releases/rabbitmq-server/v3.6.4/rabbitmq-server-3.6.4-1.noarch.rpm
sudo chkconfig rabbitmq-server on
sudo /etc/init.d/rabbitmq-server start
@yukirii
yukirii / import.rb
Created August 14, 2016 07:57
influxdb gem sample
require 'influxdb'
require 'time'
class Time
def timezone(timezone = 'UTC')
old = ENV['TZ']
utc = self.dup.utc
ENV['TZ'] = timezone
output = utc.localtime
ENV['TZ'] = old