Skip to content

Instantly share code, notes, and snippets.

@gaspanik
gaspanik / Preferences.sublime-settings.json
Created December 5, 2014 16:41
Preferences.sublime-settings
(中略)
"file_exclude_patterns":
[
"*.exe",
"*.psd",
".DS_Store",
"*.sublime-workspace",
"*.sublime-project",
".bowerrc",
".editorconfig",
@gaspanik
gaspanik / Fetch.sublime-settings.json
Created December 5, 2014 16:38
Fetch.sublime-settings
{
"files":
{
"Modernizr.js": "http://modernizr.com/downloads/modernizr-latest.js",
"Normalize.css 3.x": "https://raw.githubusercontent.com/necolas/normalize.css/master/normalize.css",
"editorconfig": "file:///Users/username/modules/editorconfig",
"gitignore": "file:///Users/username/modules/gitignore"
},
"packages":
{
@gaspanik
gaspanik / .htaccess
Last active August 29, 2015 14:10 — forked from thoop/.htaccess
# Change YOUR_TOKEN to your prerender token and uncomment that line if you want to cache urls and view crawl stats
# Change http://example.com (at the end of the last RewriteRule) to your website url
<IfModule mod_headers.c>
#RequestHeader set X-Prerender-Token "YOUR_TOKEN"
</IfModule>
<IfModule mod_rewrite.c>
RewriteEngine On
@gaspanik
gaspanik / .htaccess
Created November 14, 2014 03:27
FilesMatch for WordPress
<FilesMatch "^(wp-(config|settings).*\.php|readme\.html|license\.txt)">
Require all denied
</FilesMatch>
@gaspanik
gaspanik / .ngrok
Created November 10, 2014 16:05
Disable ngrok web interface loopback address for vagrant.
inspect_addr: 0.0.0.0:4040
@gaspanik
gaspanik / Vagrantfile
Created November 9, 2014 01:34
Synced_folder permission config for Vagrantfile 1.6.x
config.vm.synced_folder ".", "/vagrant", id: "vagrant-root", owner: "vagrant", group: "www-data", mount_options: ["dmode=775,fmode=664"]
@gaspanik
gaspanik / vhost_conf.markdown
Last active August 29, 2015 14:08
Apache 2.4.x vhost.conf

Apache 2.4 vhost.conf on yosemite

Apache 2.2.x vhost.conf

<Directory /path/to/website.com/web>
  (...)
  Order allow,deny
  Allow from all
</Directory>
(...)
@gaspanik
gaspanik / pkgbom.markdown
Last active August 29, 2015 14:08
.pkg receipts
$ cd /var/db/receipts
$ ls -l | grep example

-rw-r--r--@ 1 root  wheel     55217 Oct  2 17:49 com.example.bom
-rw-r--r--@ 1 root  wheel       259 Oct  2 17:49 com.example.plist

$ lsbom com.example.bom | pbcopy
@gaspanik
gaspanik / superstatic.json
Last active August 29, 2015 14:06
config: superstatic sample
{
"name": "ss",
"root": "./",
"routes": {
"/": "index.html"
},
"clean_urls": false,
"error_page": "error.html",
"headers": {
"/*": {
@gaspanik
gaspanik / gist:1b1f5d332898706fc6e7
Created September 12, 2014 08:49
cors-apache.htaccess
Header set Access-Control-Allow-Origin "*"
Header set Access-Control-Allow-Headers "X-Requested-With"