Skip to content

Instantly share code, notes, and snippets.

@nishinoshake
nishinoshake / viewport.html
Created August 13, 2016 22:59
viewportのmeta
<meta name="viewport" content="width=device-width, initial-scale=1">
<a href="https://developer.mozilla.org/ja/docs/Mobile/Viewport_meta_tag"></a>
@nishinoshake
nishinoshake / mq.css
Created August 13, 2016 19:05
メディアクエリ
@media screen and (max-width: 768px) {
}
@media screen and (min-width: 769px) {
}
@nishinoshake
nishinoshake / readme.md
Last active January 8, 2017 07:33
SpamAssasinのインストール

インストール

yum -y install spamassassin

起動と自動起動設定

systemctl start spamassassin
systemctl enable spamassassin

SpamAssassin設定ファイルを最新にするスクリプト作成

vi spamassassin-update

@nishinoshake
nishinoshake / readme.md
Last active July 5, 2017 04:40
PostfixとProcmailで迷惑メールの振り分け

Procmailとは

メールの振り分けをしてくれるソフトウェア。
設定ファイルにルールを記載するとよきに計らってくれる。

インストール

yum install procmail

Postfixの設定

# procmailのパス調べる

which procmail

@nishinoshake
nishinoshake / readme.md
Last active August 10, 2016 05:54
アニメーション CSS VS Javascript

まとめ

  • 単純な遷移にはCSSを使う
  • 複雑な遷移にはJSを使う
  • 可能な限り、transformとopacityの変更にする

ブラウザ描画の流れ

  • 要素に適用するスタイルの計算(Recalulate Style)
  • それぞれの要素の位置を生成(Layout)
  • それぞれの要素のピクセルを埋める(Paint)
  • 合成してスクリーンに描画(Composite Layers)
@nishinoshake
nishinoshake / link.js
Last active January 8, 2017 07:35
アクティブなページにクラス付与
@nishinoshake
nishinoshake / readme.md
Last active August 8, 2016 11:56
MTがわからん

MTがわからん

とは

CMS。 WordPressと違って静的ページを吐き出す。

用語の整理

記事

そのままブログの記事

@nishinoshake
nishinoshake / readme.md
Created August 1, 2016 11:35
Laravelの本番移行時の注意
  • bootstrap/cache消す
  • bootstrap/cacheとstorageに書き込み権限あげる
  • DB設定やURLなどを.envに設定する
  • DBあったらマイグレーションする
@nishinoshake
nishinoshake / readme.md
Last active August 1, 2016 12:53
シンプルな自動デプロイ

リモートリポジトリ作る

  cd /var/www/git
  git init --bare --shared sample.git

なにかプッシュする

作成したリモートリポジトリに対して、
ローカルからなにかをプッシュする。

デプロイするところを作る

mkdir /var/www/html/sample

@nishinoshake
nishinoshake / readme.md
Last active October 15, 2016 20:20
Composerがわからん(ついでにnpm)

なにか

PHPのパッケージ管理ソフト
Nodeでいうnpm的なやつ

インストール

ダウンロードして、
実行ファイルをパスの通ったところに移動する

cd /tmp

curl -sS https://getcomposer.org/installer | php