Skip to content

Instantly share code, notes, and snippets.

@gaspanik
gaspanik / httpd.conf
Created February 13, 2013 17:08
Apache: sample-httpd.conf
#
# This is the main Apache HTTP server configuration file. It contains the
# configuration directives that give the server its instructions.
# See <URL:http://httpd.apache.org/docs/2.2> for detailed information.
# In particular, see
# <URL:http://httpd.apache.org/docs/2.2/mod/directives.html>
# for a discussion of each configuration directive.
#
# Do NOT simply read the instructions in here without understanding
# what they do. They're here only as hints or reminders. If you are unsure
@gaspanik
gaspanik / spotlight-terminal-command.markdown
Last active December 16, 2023 07:39
OS X: spotlight indexing switch

Spotlight Indexing switch

os x terminal command.

Turn off indexing

Turn off Spotlight Indexing

sudo mdutil -a -i off
@gaspanik
gaspanik / do_nginx-gzip.markdown
Created January 7, 2014 01:06
Gzip setting on Digital Ocean's Nginx
    ##
    # Gzip Settings
    ##

    gzip on;
    gzip_disable "msie6";
    gzip_vary on;
    gzip_proxied any;
    gzip_comp_level 6;

gzip_buffers 16 8k;

@gaspanik
gaspanik / gulpfile.js
Last active July 10, 2021 13:37
sample gulpfile.js
// Original: https://github.com/gaspanik/gulpbase/
// Update 0.2.0
var gulp = require('gulp'),
// 列挙するのが面倒なので、load-pluginsでプラグインをロード。何使ってるかは「package.json」で
var $ = require('gulp-load-plugins')({
pattern: ['gulp-*', 'gulp.*'],
replaceString: /\bgulp[\-.]/
@gaspanik
gaspanik / bs-config.js
Created June 3, 2014 09:08
Browser-Sync Config for WordPress Theme Dev.
/*
|--------------------------------------------------------------------------
| Browser-sync config file
|--------------------------------------------------------------------------
|
| Please report any issues you encounter:
| https://github.com/shakyShane/browser-sync/issues
|
| For up-to-date information about the options:
| https://github.com/shakyShane/browser-sync/wiki/Working-with-a-Config-File
@gaspanik
gaspanik / st2pkgs-for-webdev.markdown
Last active January 18, 2021 09:05
ST2: Sublime Text 2 Packages for Web Developers.

Recommended Sublime Text 2 Packages for Web Developers.

Update

  • 「Browser Support」を追加しました。

2013 Spring & Summer

こもりが使っているモノやそうでないものも含め、なんとなくWebデザイナーやWebデベロッパーな人たちに便利そうなのを集めてみました。

How To Serve Multiple Ghost Blogs on One VPS

1個のVPSで複数のGhostを立ち上げる方法。といっても、下に書いてあるとおりなんですが…w

How To Serve Multiple Ghost Blogs on One VPS Using Nginx Server Blocks | DigitalOcean

Digital Oceanは、Ghostの入ったドロップレットが用意されているので、セットアップでそれを選べば1分でサイトは用意できます。Ghost側のconfig.jsとかちょいちょいっと修正すればあっという間に完成です。

でも、今のバージョンのGhostは1インストールで複数のブログを設置することができないので、複数のサイトを立ち上げたい時はサブドメインとかで分けてそれぞれを起動する必要があります。Digital OceanのGhostのドロップレットは「Ubuntu+nginx」なので、最初に任意のホストを登録した後に(Ghost動かしてからでもいいけど)nginxの設定を2つ分けてあげればオッケー。

@gaspanik
gaspanik / st2pkgs.md
Created November 7, 2012 06:54
ST2: Recommended ST2 pkgs

Recommended ST2 Packages for Beginners.

言語別の拡張というよりは、Sublime Text 2をもっと使いやすくする系のパッケージ。

※各プラグインのショートカットがうまく動かないときは、日本語入力のショートカットとバッティングしてないか見てみるといいかも。

Clipboard History

Sublime Text 上でコピーしたもののクリップボード管理。

@gaspanik
gaspanik / pkglist2013dec.markdown
Created December 14, 2013 14:40
Installed ST2 pkgs.
  • AdvancedNewFile
  • AndyJS2
  • AndyPHP
  • AngularJS
  • ApacheConf.tmLanguage
  • Auto Semi-Colon
  • AutoFileName
  • Backbone.js
  • Bootstrap 3 Snippets
  • BracketHighlighter
@gaspanik
gaspanik / capture.js
Last active November 6, 2018 06:19
Take screenshot at single viewport size using CasperJS
var screenshotUrl = 'http://example.com/'
var casper = require("casper").create({
viewportSize: {
width: 1024,
height: 768
}
});
if (casper.cli.args.length < 1) {