Skip to content

Instantly share code, notes, and snippets.

#######################################################
### nginx Grav CMS basic configuration start
#######################################################
###
### Add recommended HTTP headers
###
add_header Access-Control-Allow-Origin *;
add_header X-Frame-Options SAMEORIGIN;
add_header X-Content-Type-Options nosniff;
---start---
find /var/www/grav-onepage -type d -exec chmod 0755 {} \; &> /dev/null
find /var/www/grav-onepage -type f -exec chmod 0644 {} \; &> /dev/null
chown -R www72:www-data /var/www/grav-onepage
find /var/www/grav-onepage/bin -type d -exec chmod 02755 {} \; &> /dev/null
find /var/www/grav-onepage/bin -type f -exec chmod 0755 {} \; &> /dev/null
find /var/www/grav-onepage/tmp -type d -exec chmod 02775 {} \; &> /dev/null
@pricejn2
pricejn2 / double_ip_test.py
Created February 26, 2017 05:56 — forked from dchaplinsky/double_ip_test.py
Simple scrapy spider to utilize bindaddress meta param
from scrapy.spider import BaseSpider
from scrapy.conf import settings
from scrapy.http import Request
from random import choice
class DoubleIPSpider(BaseSpider):
name = "double_ip_test"
allowed_domains = ["httpbin.org"]
@pricejn2
pricejn2 / 0_reuse_code.js
Created February 7, 2017 01:30
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@pricejn2
pricejn2 / nginx_wordpress_include.conf
Last active March 7, 2017 19:29 — forked from omega8cc/gist:1677835
Wordpress nginx include file for BOA
#######################################################
### nginx.conf site wp vhost include start
#######################################################
###
### deny crawlers without 403 response
###
if ($http_user_agent ~* (HTTrack|HTMLParser|libwww|wget) ) {
return 444;
}