Skip to content

Instantly share code, notes, and snippets.

// Original: https://github.com/gaspanik/gulpbase/
var gulp = require('gulp'),
// 列挙するのが面倒なので、load-pluginsでプラグインをロード。何使ってるかは「package.json」で
$ = require('gulp-load-plugins')({
pattern: ['gulp-*', 'gulp.*'],
replaceString: /\bgulp[\-.]/
}),
var gulp = require("gulp");
var loadPlugins = require('gulp-load-plugins');
var $ = loadPlugins();
var browserSync = require("browser-sync");
// base config
var paths = {
vhost: "***********",
cmnDir: "htdocs/cmn/",
@shuuheyhey
shuuheyhey / Monokai Customize.md
Last active December 17, 2015 13:19
Sublime text2 Original Color Scheme

image

Sublime text2 Original Color Scheme

@shuuheyhey
shuuheyhey / screenshot.js
Created May 20, 2013 22:50
casperjs > screenshot.js スクリーンショット自動化
/*
* 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
@shuuheyhey
shuuheyhey / capture.js
Created May 20, 2013 22:51
casperjs > capture.js
var screenshotUrl = 'http://example.com/'
var casper = require("casper").create({
viewportSize: {
width: 1280,
height: 1280
}
});
if (casper.cli.args.length < 1) {
@shuuheyhey
shuuheyhey / .htaccess
Created May 20, 2013 22:54
apache Gzip有効化
#Gzip
<IfModule mod_deflate.c>
SetOutputFilter DEFLATE
BrowserMatch ^Mozilla/4 gzip-only-text/html
BrowserMatch ^Mozilla/4\.0[678] no-gzip
BrowserMatch \bMSI[E] !no-gzip !gzip-only-text/html SetEnvIfNoCase Request_URI \.(?:gif¦jpe?g¦png)$ no-gzip dont-vary Header append Vary User-Agent env=!dont-vary
</IfModule>
@shuuheyhey
shuuheyhey / shots_from_listed_urls.js
Last active December 17, 2015 14:09 — forked from ahomu/shots_from_listed_urls.js
スクショいっぱい撮るとき。require phantomjs >1.7, async.js >0.2.7
var PARALLEL_LIMIT = 3;
var Page = require('webpage');
var async = require('/Users/shuuheyhey/Sites/async.js');
var i = 0, iz;
var urls = [
"http://css.studiomohawk.com",
"http://inkdesign.jp",
"http://t32k.me/mol",
"http://havelog.ayumusato.com",
"http://aho.mu"
@shuuheyhey
shuuheyhey / detectVendorFunction.js
Created May 21, 2013 19:58 — forked from ahomu/detectVendorFunction.js
ベンダープレフィックス決めるくん.js
function detectVendorFunction(object, methodName) {
var upperName = methodName.charAt(0).toUpperCase()+methodName.substr(1),
detectedMethod;
detectedMethod = object[methodName] ||
object['webkit'+upperName] ||
object['moz'+upperName] ||
object['ms'+upperName] ||
object['o'+upperName];

AWSのせっていまとめ

インスタンスの作成

SSHでログイン

サーバーを起動させた状態でaction connect。

Connect with a standalone SSH Clientを展開

@shuuheyhey
shuuheyhey / httpd-vhosts.conf
Created May 23, 2013 01:41
httpd-vhosts-sample.conf
NameVirtualHost *:80
<Directory "/Users/shuuheyhey/Sites">
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
Allow from all
</Directory>
<VirtualHost _default_:80>