Skip to content

Instantly share code, notes, and snippets.

View mamemomonga's full-sized avatar
🏠
Working from home

Shotaro Takahashi mamemomonga

🏠
Working from home
View GitHub Profile
@mamemomonga
mamemomonga / prowl_notify_ipaddr.pl
Last active August 29, 2015 14:13
prowlで現在のwlan0のIPアドレスを通知する
#!/usr/bin/env perl
use utf8;
use strict;
use warnings;
use URI::Escape;
binmode(STDOUT,':utf8');
my %cnf=(
name => 'prowl_notify_wifi_addr',
curl => '/usr/bin/curl',
@mamemomonga
mamemomonga / gist:f4d9e997898a60060666
Last active August 29, 2015 14:13
MinGW+MinTTY セットアップメモ
@mamemomonga
mamemomonga / gist:f47a9c87acc1328b25a8
Created January 18, 2015 07:48
ディレクトリ単位でパッチを作成、パッチを当てる

ディレクトリ単位でパッチを作成、パッチを当てる

diff -cr [元フォルダ] [修正後フォルダ] > [パッチファイル]
patch -p0 < [パッチファイル]
@mamemomonga
mamemomonga / gw-450d-raspbian.patch
Last active August 29, 2015 14:13
mt7610u_wifi_sta_v3002_dpo_20130916 patch for Planex GW-450d
diff -cr mt7610u_wifi_sta_v3002_dpo_20130916.orig/Makefile mt7610u_wifi_sta_v3002_dpo_20130916/Makefile
*** mt7610u_wifi_sta_v3002_dpo_20130916.orig/Makefile 2013-09-16 23:03:08.000000000 +0900
--- mt7610u_wifi_sta_v3002_dpo_20130916/Makefile 2015-01-18 18:01:21.657950330 +0900
***************
*** 14,20 ****
# rt8592(for rt85592), mt7650e, mt7630e, mt7610e, mt7650u, mt7630u, mt7610u
ifeq ($(CHIPSET),)
! CHIPSET = mt7650u mt7630u mt7610u
endif
@mamemomonga
mamemomonga / Cygwin.bat
Created January 19, 2015 21:06
Cygwin mintty起動スクリプト
@echo off
SET HOME=/home/%USERNAME%
cd /d C:\cygwin64\bin
start "" mintty -
@mamemomonga
mamemomonga / gist:abcb2c278e689656b595
Last active August 29, 2015 14:13
Print the IP address( from raspbian /etc/rc.local )
# Print the IP address
_IP=$(hostname -I) || true
if [ "$_IP" ]; then
printf "My IP address is %s\n" "$_IP"
fi
# Debianで起動後画面を消さないなら
vim /etc/inittab
1:2345:respawn:/sbin/getty --noclear 38400 tty1
@mamemomonga
mamemomonga / gist:1d99d33ed012442410c8
Created January 21, 2015 08:46
特定ユーザで自動ログインする (Debian)
vim /etc/inittab
#1:2345:respawn:/sbin/getty --noclear 38400 tty1
1:2345:respawn:/bin/login -f demouser tty1 </dev/tty1 >/dev/tty1 2>&1
@mamemomonga
mamemomonga / gist:1839e1cadd6dc36f45e0
Created January 22, 2015 16:52
LinuxでmDNSのSSHをアナウンスする設定
@mamemomonga
mamemomonga / gist:2d7df1c0eb99fd092a31
Last active August 29, 2015 14:13
Raspberry Pi(raspbian)でSSHからHDMI接続中の画面にXを使わず画像を表示する。
#!/bin/bash
REV=`zcat /usr/share/doc/raspberrypi-bootloader/changelog.Debian.gz | grep '* firmware as of' | head -n 1 | sed -e 's/\ \*\ firmware as of \(.*\)$/\1/'`
rm -rf rasp-tmp
mkdir -p rasp-tmp
mkdir -p rasp-tmp/linux
wget https://raw.github.com/raspberrypi/firmware/$REV/extra/git_hash -O rasp-tmp/git_hash
wget https://raw.github.com/raspberrypi/firmware/$REV/extra/Module.symvers -O rasp-tmp/Module.symvers