Skip to content

Instantly share code, notes, and snippets.

@PGMY
PGMY / file0.txt
Created January 20, 2014 14:15
Serversman@VPS 初期設定 ref: http://qiita.com/PGMY/items/c2eb0fb0c9df1dd12ff6
$ ssh -p [ポート番号] root@[IPアドレス]
The authenticity of host ******* can't be established.
RSA key fingerprint is ********.
Are you sure you want to continue connecting (yes/no)? yes
#
Distribution      : CentOS 6.5
GitLab version    : 6.0 - 6.4
Web Server        : Apache, Nginx
Init system       : sysvinit
Database          : MySQL, PostgreSQL
Contributors      : @nielsbasjes, @axilleas, @mairin, @ponsjuh, @yorn, @psftw, @etcet
Additional Notes  : In order to get a proper Ruby setup we build it from source
@PGMY
PGMY / getDevice.js
Created April 12, 2013 02:49
JSでiOSのデバイス判定してみたり ref: http://qiita.com/items/ad5236b06d2029e8fb1c
function getDevice(){
var ua = navigator.userAgent;
var device = 0;
if(ua.match(/iPhone/i)) device = 1;
if(ua.match(/iPad/i)) device = 2;
if(ua.match(/iPod/i)) device = 3;
switch (device ) {
case 1:
if( window.devicePixelRatio >= 2 ) {
@PGMY
PGMY / iOSLib.md
Last active December 11, 2017 06:26
iOSで使えるライブラリなリポジトリまとめ
@PGMY
PGMY / index.html
Created September 6, 2012 05:19
more than 50 shapes using Pure CSS http://cssshapes.iweb.uz/
<div class="frame">
<div class="star"></div>
</div>
<div class="frame">
<div class="star2"></div>
</div>
<div class="frame">
<div class="star11"></div>
</div>
<div class="frame">
@PGMY
PGMY / index.html
Created September 6, 2012 05:19
more than 50 shapes using Pure CSS http://cssshapes.iweb.uz/
<div class="frame">
<div class="star"></div>
</div>
<div class="frame">
<div class="star2"></div>
</div>
<div class="frame">
<div class="star11"></div>
</div>
<div class="frame">
@PGMY
PGMY / gist:3507072
Created August 29, 2012 05:19
Markdown cheat sheet

Header 1

Header 2

Header 3 ### (Hashes on right are optional)

Header 4

Header 5

Markdown plus h2 with a custom ID ## {#id-goes-here}

Link back to H2

This is a paragraph, which is text surrounded by whitespace. Paragraphs can be on one

@PGMY
PGMY / hoge.markdown
Created August 29, 2012 04:39 — forked from taizooo/hoge.markdown
gist で markdown 記法がつかえる。

#なんだかんだ

##えーと1 どういうこういう そういうどういう

##えーと2 どういうこういう そういうどういう

@PGMY
PGMY / JUnitCheatSheet.md
Created August 29, 2012 04:36
My JUnit cheat sheet

##My JUnit Cheat Sheet.

####assertEquals(arg1, arg2) arg1とarg2が同じ値かどうか判別します。違う場合はFailure(失敗)になります。基本型、オブジェクト型の両方を判別できます。

####assertEquals(msg, arg1, arg2) 上記と同様に振舞います。値が違う場合はメッセージとしてmsgを表示します。

####assertTrue(boolean)

@PGMY
PGMY / gist:3434749
Created August 23, 2012 09:39 — forked from rosylilly/gist:3401612
先輩と覚える HTTP ステータスコード

先輩に学ぶ HTTP Status Code

超雑にまとめました。修正してください。

登場人物

  • アプリケーション先輩: いつも忙しい。横に広がるのが得意(デブじゃない)。
  • 後輩: 頼んでばっかしで役に立たない。
  • サーバー先輩: アプリケーション先輩と仲がいい。Unix Socket でつながるくらい仲良し。
  • プロクシ先輩: アプリケーション先輩とかサーバー先輩と後輩の間を取り持って代わりに伝えたりしてくれる。たまに勝手にレスポンスを書き換える。