Skip to content

Instantly share code, notes, and snippets.

View satomixx's full-sized avatar

Satomi Suyama satomixx

View GitHub Profile
@satomixx
satomixx / file0.txt
Created April 19, 2013 02:27
さくらVPS 1GB に CentOS6.4 を入れて、 環境構築1 - ssh など ref: http://qiita.com/items/533f591cf5d79b81a3aa
# cat /etc/redhat-release
CentOS release 6.4 (Final)
# vim /proc/cpuinfo
model name : Intel(R) Xeon(R) CPU E5645
cpu MHz : 2400.032
cache size : 4096 KB
・・・
@satomixx
satomixx / countdown_timer.html
Created December 16, 2013 04:35
JavaScript (jQuery) でカウントダウンタイマーを書く ref: http://qiita.com/mugyuu/items/45ee16aca2972abf7c7d
<script type="text/javascript">
$(function() {
countDown();
});
function countDown() {
var startDateTime = new Date();
var endDateTime = new Date("January 01,2014 00:00:00");
var left = endDateTime - startDateTime;
var a_day = 24 * 60 * 60 * 1000;
@satomixx
satomixx / file0.txt
Created April 26, 2013 05:09
覚えておきたい Vim コマンド 備忘録 ref: http://qiita.com/mugyuu/items/755cfbb0e97d48280775
x
1文字削除
dd(連打)
1行削除
dd(x行目で1回目のdを押し、y行目で2回目のdを押す)
x行目〜y行目までを削除
5dd (xdd)
5(x)行削除
@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {
var window: UIWindow?
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
let rootViewController = MainTableViewController()
@satomixx
satomixx / file0.txt
Created January 21, 2014 06:53
Mac OSX Mavericks(10.9)にFuelPHPを導入する方法 と Web共有設定をターミナルからする方法 と ドキュメントルートの変更 ref: http://qiita.com/mugyuu/items/2c467b85e7f5730478ab
hoge% http -v
Server version: Apache/2.2.24 (Unix)
Server built: Aug 24 2013 21:10:43
@satomixx
satomixx / file0.txt
Created January 17, 2014 07:04
色んなパッケージのバージョン確認コマンドメモ PHP, Perl, Apache, Git, Subversion, Fluentd, MongoDB ref: http://qiita.com/mugyuu/items/2e14d26108279185ff24
[hoge@hoge ~]$ php -v
----
PHP 5.1.1 (cli) (built: Feb 20 2011 00:00:00)
Copyright (c) 1997-2012 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2012 Zend Technologies
with Xdebug v1.1.3, Copyright (c) 2002-2012, by Derick Rethans
@satomixx
satomixx / gist:8121798
Created December 25, 2013 09:46
Rails4でheroku Pushまでの最短手順 [haml/bootstrap 3.0/postgresql or MySQL] - 酒と泪とRubyとRailsと
これ出来上がってる!
http://morizyun.github.io/blog/heroku-rails4-postgresql-introduction/
@satomixx
satomixx / pbcopy
Created December 18, 2013 06:21
【毎回忘れる】ファイルの中身をクリップボードにコピー、出力 ref: http://qiita.com/mugyuu/items/248bdd8a800d8fb40dd5
% ls -la | pbcopy #上のcatのコマンドと同じ感じです。
@satomixx
satomixx / confirm_partition
Created December 18, 2013 05:45
MySQLパーティショニングの設定、追加、削除、再構成 ref: http://qiita.com/mugyuu/items/d81c6daff4800d735bdc
SELECT TABLE_SCHEMA, TABLE_NAME, PARTITION_NAME, PARTITION_ORDINAL_POSITION, TABLE_ROWS
FROM INFORMATION_SCHEMA.PARTITIONS
WHERE TABLE_NAME = 'list_rtx';
@satomixx
satomixx / file0.txt
Created December 13, 2013 05:02
月末にだけcronでbatchを叩きたい場合 && /dev/null や 2>&1 について ref: http://qiita.com/mugyuu/items/f835b42ab45ff6246039
55 23 28-31 * * /usr/bin/test $( date -d '+1 day' +\%d ) -eq 1 && perl /getsumatsu_batch.pl > /dev/null 2>&1