Skip to content

Instantly share code, notes, and snippets.

View maeharin's full-sized avatar

Hidenori Maehara maeharin

View GitHub Profile
@maeharin
maeharin / gist:5d2b51fbe7150e67a979
Created May 18, 2014 06:53
gemがインストールされている場所に移動
$ cd $(bundle show activerecord)
@maeharin
maeharin / .bashrc
Created August 24, 2014 04:57
macにctagsインストールして、vimでRailsのソースコード読む ref: http://qiita.com/maeharin/items/9f98c0d63ab764ee21a8
alias ctags="`brew --prefix`/bin/ctags"
import UIKit
let code: String = "0001"
let num = code.toInt()! + 100
println(num)
// ---
let user_datas = [
@maeharin
maeharin / mvn_init.sh
Last active August 29, 2015 14:17
maven雛形
#!/bin/bash
function exit_with_error() {
echo "[ERROR]"
exit 1
}
#
# parse option
#
@maeharin
maeharin / maven_raw_servlet.md
Last active August 29, 2015 14:17
java,mavenで生servlet

java,mavenで生servlet

プロジェクト作成

$ cd /Users/hidenorimaehara/sandbox
$ mvn_init -a raw_servlet -t web
$ cd raw_servlet
@maeharin
maeharin / eclipse.md
Created March 29, 2015 07:53
eclipseの自分用設定

====== eclipse設定 ======

==== ホットデプロイの設定 ====

  • 以下のブログの内容を試してみる
    • http://yamkazu.hatenablog.com/entry/20110327/1301212811
    • viewは自動反映されないかも。。serverビューのdebugボタンを押す必要あり
    • とはいえ、gitでブランチ切り替えても、debugボタン押すだけで正常動作するので、reloadable=trueにしておくよりも圧倒的に安定している感ある

==== logの設定 ====

@maeharin
maeharin / cmd_twitter.php
Created April 20, 2012 03:13
view twitter time line at command line (witten by php)
#!/usr/local/bin/php
<?php
$user_id = $argv[1];
if ($user_id) {
$url = 'https://twitter.com/statuses/user_timeline.json?id=' . $user_id;
$tweet = file_get_contents($url);
$tweet = json_decode($tweet);
foreach($tweet as $v) {
echo $v->text . "\n";
@maeharin
maeharin / cmd_yahoo.php
Created April 20, 2012 03:25
view yahoo japan daily news at command line (written by PHP)
#!/usr/local/bin/php
<?php
$url = 'http://rss.dailynews.yahoo.co.jp/fc/rss.xml';
$rss = simplexml_load_file($url);
foreach ($rss->channel->item as $v) {
echo $v->title . "\n";
}
@maeharin
maeharin / show_fb_public_info.html
Created April 22, 2012 13:58
show facebook user's public information (javascript/jQuery)
<html>
<div id="hoge"></div>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
<script>
var user_id = 'zuck'; //facebook id
var url = 'https://graph.facebook.com/' + user_id + '?callback=?';
var additional_html;
$.getJSON(url, function (res) {
for(var i in res) {
additional_html += i + ':' + res[i] + '<br>';
@maeharin
maeharin / show_fb_picture.html
Created April 22, 2012 14:32
show picture of another gender facebook friends (javascript.jQuery)
<html lang="ja">
<head>
<script src="http://connect.facebook.net/ja_JP/all.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
</head>
<body>
<div id="start_section"></div>
<div id="friend_section"></div>
<div id="fb-root"></div>
<script type="text/javascript">