Skip to content

Instantly share code, notes, and snippets.

View goldeneggg's full-sized avatar

Fuminori Sakamoto goldeneggg

  • 合同会社Practa / Practa LLC (Founder)
  • Japan
  • X @practainc
View GitHub Profile
@goldeneggg
goldeneggg / MainActivity.java
Created September 12, 2011 13:58
DevQuiz 2011 Androidの解答(Activity&layout xml)
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 September 12, 2011 14:02
DevQuiz 2011 神経衰弱の解答(Chrome Extension)
{
"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": [
@goldeneggg
goldeneggg / HttpUtil.java
Created December 17, 2011 06:59
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 April 14, 2012 07:50
CentOS6.2にmoshを導入してMacから接続する

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 July 1, 2012 15:53
MySQL5.5インストール on CentOS 6.2

事前準備

% 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 October 25, 2012 15:58
amazon先生がchromeでKindle化リクエストボタン表示に対応してくれるまでのブックマークレット
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 December 15, 2015 08:29
Chef : userを追加する

"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 March 24, 2013 08:06
Chef : screenをパッケージインストールする

"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 June 1, 2013 12:21
oracle.comからjdkをwgetでダウンロードする
#!/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 October 13, 2013 12:14
AirMac Express(2012)とフレッツルーター(RV-S340SE)でのネットワーク構築

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

接続構成イメージ

(フレッツルーター)  ※ルーターIP = 101(仮)
  ↓ [有線]
(AirMac Express)  ※IP固定(=102(仮)とする)にしたい
  ↓ [無線]
 - (Mac Mini) ※IP固定(=103(仮)とする)にしたい