Skip to content

Instantly share code, notes, and snippets.

View goldeneggg's full-sized avatar

Fuminori Sakamoto goldeneggg

  • 合同会社Practa/Practa, Inc.(Founder)
  • Japan
  • X @practainc
View GitHub Profile
@goldeneggg
goldeneggg / trendsearcher.coffee
Created March 17, 2015 15:42
trend search by otter API
# Description:
# Trend search by otter API
#
# Dependencies:
# None
#
# Configuration:
# None
#
# Commands:
@goldeneggg
goldeneggg / asanaevents.rb
Created May 20, 2015 02:45
asanaの新規タスク情報を取得するスクリプト
require "json"
require "net/http"
require "uri"
require "pathname"
require "pp"
class AsanaEvents
BASE_URI = "https://app.asana.com/api/1.0"
SYNC_SAVE_PATH = "#{ENV['HOME']}/.asana_events_api/sync.txt"
@goldeneggg
goldeneggg / stdin
Created June 18, 2015 06:02
rails本体のテストコードっぽいファイル一覧
./actionmailer/bin/test
./actionmailer/lib/action_mailer/test_case.rb
./actionmailer/lib/action_mailer/test_helper.rb
./actionmailer/test/fixtures/attachments/test.jpg
./actionmailer/test/test_case_test.rb
./actionmailer/test/test_helper_test.rb
./actionpack/bin/test
./actionpack/lib/action_controller/metal/testing.rb
./actionpack/lib/action_controller/test_case.rb
./actionpack/lib/action_dispatch/testing/test_process.rb
@goldeneggg
goldeneggg / gocon2015s.md
Last active August 29, 2015 14:23
gocon 2015 summer のメモ

gocon2015s

https://github.com/GoCon/GoCon/blob/master/2015summer.rst

Prepare

  • rakyll/boom (ベンチマークツール) のコード読み
  • mholt/caddy (HTTP2サーバ) のコード読み
  • yhat/scrape (超シンプルwebスクレイパ) のコード読み
  • golang.org/x/ パッケージの最近の状況把握
@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 / attribute_convertable.rb
Created October 7, 2015 06:57
属性値の設定時に自動変換を行うconcern module
module AttributeConvertable
extend ActiveSupport::Concern
included do
# 全角英数字を半角英数字に変換
#
# (使用例.modelの定義)
# downcase_attr :hoge
#
# (使用例.modelへの値設定)