Skip to content

Instantly share code, notes, and snippets.

@gaspanik
gaspanik / httpd-vhosts.conf
Created February 13, 2013 01:48
httpd-vhosts-sample.conf
NameVirtualHost *:80
<Directory "/Users/ユーザー名/Sites">
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
Allow from all
</Directory>
<VirtualHost _default_:80>
@gaspanik
gaspanik / httpd.conf
Last active December 13, 2015 17:09 — forked from deroter/httpd.conf
#
# Mac OS X / Mac OS X Server
# The <IfDefine> blocks segregate server-specific directives
# and also directives that only apply when Web Sharing or
# server Web Service (as opposed to other services that need Apache) is on.
# The launchd plist sets appropriate Define parameters.
# Generally, desktop has no vhosts and server does; server has added modules,
# custom virtual hosts are only activated when Web Service is on, and
# default document root and personal web sites at ~username are only
# activated when Web Sharing is on.
@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
<VirtualHost *:80>
ServerName pow
ServerAlias *.dev
ServerAlias *.xip.io
ProxyPass / http://localhost:20559/
ProxyPassReverse / http://localhost:20559/
ProxyPreserveHost On
</VirtualHost>
@gaspanik
gaspanik / kkmsz20130417.mdown
Created April 17, 2013 16:34
kkmsz 2013.04.16
@gaspanik
gaspanik / TXT: kkmsz-ibdsgn-vol1.markdown
Created April 18, 2013 07:33
how to install node.js

Designing in the browser Vol. 1

こけむさずで開催した「インブラウザ勉強会」の補足。

Installing Node.js

Node.jsのインストールは自分の好きな方法でどうぞ。簡単なのはもちろん1です。

  1. Node.jsのインストールは公式サイトの「Download」からバイナリをインストールする
  2. Homebrewで「brew install node」を実行する
@gaspanik
gaspanik / screenshots.js
Last active December 17, 2015 12:19 — forked from nhoizey/screenshots.js
Take screenshots at different viewport sizes using CasperJS
/*
* Takes provided URL passed as argument and make screenshots of this page with several viewport sizes.
* These viewport sizes are arbitrary, taken from iPhone & iPad specs, modify the array as needed
*
* Original:
* nhoizey / screenshots.js https://gist.github.com/nhoizey/4060568
*
* Usage:
* $ casperjs screenshots.js http://example.com
*/
@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) {
@gaspanik
gaspanik / main.js
Created May 25, 2013 08:47
jQuery(CDN/Fallback) & Bootstrap load by Requirejs
requirejs.config({
baseUrl: '/js',
paths: {
jquery: ['//ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min','jquery.min'],
bootstrap: 'bootstrap.min'
},
shim: {
'bootstrap':{deps: ['jquery']}
}
});
@gaspanik
gaspanik / package.json
Created May 25, 2013 23:06
package.json for jamjs package manager.
{
"jam": {
"packageDir": "public/vendor",
"baseUrl": "public",
"dependencies": {
}
}
}