Skip to content

Instantly share code, notes, and snippets.

Avatar

Fuminori Sakamoto goldeneggg

View GitHub Profile
@goldeneggg
goldeneggg / MainActivity.java
Created Sep 12, 2011
DevQuiz 2011 Androidの解答(Activity&layout xml)
View MainActivity.java
package devquiz11.aidl;
import android.app.Activity;
import android.content.ComponentName;
import android.content.Intent;
import android.content.ServiceConnection;
import android.os.Bundle;
import android.os.IBinder;
import android.os.RemoteException;
import android.view.View;
@goldeneggg
goldeneggg / manifest.json
Created Sep 12, 2011
DevQuiz 2011 神経衰弱の解答(Chrome Extension)
View manifest.json
{
"name": "ChromeExtensionSolverHint",
"version": "1.0",
"description": "Open the first card and show background color of the card.",
"content_scripts": [
{
"matches": [
"http://gdd-2011-quiz-japan.appspot.com/webgame/problem*"
],
"js": [
View HttpUtil.java
package net.shadowapps.commons.util.http;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.UnsupportedEncodingException;
import java.net.HttpURLConnection;
import java.net.URL;
import java.net.URLEncoder;
import java.util.Map;
@goldeneggg
goldeneggg / mosh.wiki
Created Apr 14, 2012
CentOS6.2にmoshを導入してMacから接続する
View mosh.wiki

Mosh


% sudo yum -y install boost

% wget http://protobuf.googlecode.com/files/protobuf-2.4.1.tar.gz % tar -zxvf protobuf-2.4.1.tar.gz % cd protobuf-2.4.1 % ./configure LDFLAGS=-Wl,-rpath,/usr/local/lib --prefix=/usr/local % make % sudo make install

@goldeneggg
goldeneggg / gist:3028800
Created Jul 1, 2012
MySQL5.5インストール on CentOS 6.2
View gist:3028800

事前準備

% sudo yum -y install cmake bison ncurses-devel

mysql5.5本体インストール

% wget http://dev.mysql.com/get/Downloads/MySQL-5.5/mysql-5.5.24.tar.gz/from/http://ftp.iij.ad.jp/pub/db/mysql/
% tar -zxvf mysql-5.5.24.tar.gz
% cd mysql-5.5.24
@goldeneggg
goldeneggg / gist:3953635
Created Oct 25, 2012
amazon先生がchromeでKindle化リクエストボタン表示に対応してくれるまでのブックマークレット
View gist:3953635
var asin = document.getElementById('ASIN').value;
location.href = 'http://www.amazon.co.jp/gp/digital/fiona/detail/request-kindle-edition/ref=dtp_dp_su_' + asin + '?ie=UTF8&a=' + asin;
@goldeneggg
goldeneggg / gist:5230975
Last active Dec 15, 2015
Chef : userを追加する
View gist:5230975

"user" resourceを使う

$ cd <chef-repo dir>/cookbooks
$ knife cookbook create user_add -o ./
$ cd user_add
$ vi attributes/user_add.rb
default['user'] = "hoge"
@goldeneggg
goldeneggg / gist:5230979
Created Mar 24, 2013
Chef : screenをパッケージインストールする
View gist:5230979

"package" resourceを使う

$ cd <chef-repo dir>/cookbooks
$ knife cookbook craete install_screen -o ./
$ cd install_screen
$ vi recipes/default.rb
package "screen" do
@goldeneggg
goldeneggg / hoge.sh
Created Jun 1, 2013
oracle.comからjdkをwgetでダウンロードする
View hoge.sh
#!/bin/sh
VER=7u21
HTML_NO=1505220
BETA_VER=b11
wget --no-check-certificate --no-cookies --header "Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com%2Ftechnetwork%2Fjava%2Fjavase%2Fdownloads%2Fjdk-${VER}-download-${HTML_NO}.html;" http://download.oracle.com/otn-pub/java/jdk/${VER}-${BETA_VER}/jdk-${VER}-linux-x64.rpm -O jdk-${VER}.rpm
@goldeneggg
goldeneggg / gist:6961622
Created Oct 13, 2013
AirMac Express(2012)とフレッツルーター(RV-S340SE)でのネットワーク構築
View gist:6961622

AirMac Express(2012)とフレッツルーター(RV-S340SE)でのネットワーク構築

接続構成イメージ

(フレッツルーター)  ※ルーターIP = 101(仮)
  ↓ [有線]
(AirMac Express)  ※IP固定(=102(仮)とする)にしたい
  ↓ [無線]
   - (Mac Mini)  ※IP固定(=103(仮)とする)にしたい
You can’t perform that action at this time.