Skip to content

Instantly share code, notes, and snippets.

@LuckOfWise
LuckOfWise / gist:2975981
Created June 23, 2012 00:30
[Android]アカウント設定画面の呼び出し
package com.luckofwise.accountcall;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.provider.Settings;
public class AccountCallActivity extends Activity {
/** Called when the activity is first created. */
@Override
@LuckOfWise
LuckOfWise / Gemfile
Created October 5, 2012 02:06
twitter-bootstrap-rails ことはじめ ref: http://qiita.com/items/7b7e5934004a49591ed8
gem "twitter-bootstrap-rails"
@LuckOfWise
LuckOfWise / file0.txt
Created October 5, 2012 07:24
会社に新しいMBAが届いたので開発環境構築メモ ref: http://qiita.com/items/e8eb14e3a3ee71b4f3c0
sudo mkdir /usr/local
sudo chown -R (ログインユーザー) /usr/local
cd /usr/local
ln -s /usr/local/homebrew/bin/brew /usr/local/bin/brew
# -*- coding: utf-8 -*-
task :backup do
FILES = 3
path = "config/database.yml"
info = YAML.load_file(path)["production"]
backup_dir = "/backup"
unless File.exists?(backup_dir)
Dir::mkdir(backup_dir)
end
@LuckOfWise
LuckOfWise / 移動累計を求めたい
Last active December 13, 2015 17:48
売上明細的なテーブルで、各ショップ、日ごとに対象の日から1年前までの集計値を求める。 これ合ってんのか??
相関クエリ
select T1.shop_id,
T1.sales_date,
( select sum(cash_amount)
from shop_sales_details T2
where T2.shop_id = T1.shop_id
and T2.sales_date between T1.sales_date + cast('-1 year' as interval) and T1.sales_date
) as cash_amount,
( select sum(other0)
from shop_sales_details T2
@LuckOfWise
LuckOfWise / EventMapFragment.java
Last active April 10, 2017 08:12
MapFragmentをTabの要素として表示したい to @shikajiro
package jp.kickhost.eventnavi;
import java.util.ArrayList;
import jp.kickhost.localsearch.model.Event;
import android.app.Fragment;
import android.os.Bundle;
import android.text.format.Time;
import android.util.Log;
import android.view.InflateException;
・好きなメソッドは?
・好きなアニメは?
・好きな言語は?
・好きなガンダムシリーズは?
・githubアカウントは?
・あなたの習得している中で一番FizzBuzzを短くかける言語は?
・英語しゃべれる?
・最近気になるテクノロジーは?
・最近行った勉強会は?
・最近登壇した勉強会は?
@LuckOfWise
LuckOfWise / Gemfile
Created April 16, 2013 07:52
2013/4の時点でrails4を動かそうとしたGemfile
source 'https://rubygems.org'
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '4.0.0.beta1'
gem 'i18n_generators'
gem 'simple_form'
gem 'devise', git: 'https://github.com/plataformatec/devise.git', branch: 'rails4'
gem 'protected_attributes'
gem 'kaminari'
<?xml version="1.0" encoding="UTF-8"?>
<scheme name="PatorashRailscast" version="124" parent_scheme="Default">
<option name="LINE_SPACING" value="1.0" />
<option name="EDITOR_FONT_SIZE" value="14" />
<option name="EDITOR_FONT_NAME" value="Menlo" />
<colors>
<option name="CARET_COLOR" value="ffffff" />
<option name="CARET_ROW_COLOR" value="333435" />
<option name="CONSOLE_BACKGROUND_KEY" value="2b2b2b" />
<option name="GUTTER_BACKGROUND" value="2b2b2b" />