Skip to content

Instantly share code, notes, and snippets.

View fransallen's full-sized avatar

Frans Allen fransallen

View GitHub Profile
@fransallen
fransallen / nginx.conf
Created May 21, 2021 13:01
An nginx configuration to block referers except valid ones.
server {
# https://nginx.org/en/docs/http/ngx_http_referer_module.html
valid_referers server_names *.example.com;
if ($invalid_referer) {
return 403;
}
...
}
@fransallen
fransallen / cdn.vqmod.xml
Last active January 21, 2020 09:34
Statically OpenCart Integration with VQmod
<modification>
<id><![CDATA[Statically OpenCart Integration]]></id>
<version><![CDATA[2.4+]]></version>
<vqmver><![CDATA[1.0.0]]></vqmver>
<author><![CDATA[https://www.statically.io]]></author>
<file name="system/library/response.php">
<operation>
<search position="replace"><![CDATA[echo $output;]]></search>
<add><![CDATA[echo $this->cdn_output($output);]]></add>
</operation>
@fransallen
fransallen / s-bookmarklet-core.js
Last active December 4, 2019 15:47
Capture web pages with bookmarklets!
SS_ENDPOINT = "https://cdn.statically.io/s/";
DOMAIN = window.location.hostname;
PATH = window.location.pathname;
window.open(SS_ENDPOINT + DOMAIN + PATH);
@fransallen
fransallen / .vimrc
Last active September 18, 2020 05:37
Nice config for Vim
set ts=2 sw=2 cc=80 expandtab number noswapfile
colorscheme delek
@fransallen
fransallen / gist.html
Created September 19, 2018 19:05
Staticaly Platform Tester
<p>Test starting.. Redirecting to GitHub..</p>
<script>document.location.replace('/gh/fransallen/staticaly-platform-test/master/github.html')</script>
<noscript><meta http-equiv="refresh" content="0; URL='/gh/fransallen/staticaly-platform-test/master/github.html'"></noscript>