Skip to content

Instantly share code, notes, and snippets.

View NicholasRBowers's full-sized avatar

Nicholas Bowers NicholasRBowers

View GitHub Profile
@2shrestha22
2shrestha22 / cloudflare-worker-edge-cache.js
Last active February 23, 2023 05:47
Cloudflare workers script to enable edge-cache. Use Official cloudflare wordpress pulgin for auto cache purge management
// Stop CF edge from caching your site when specific wordpress cookies are present
// script found in https://www.mmaton.com/2018/07/02/cloudflare-cache-anonymous-requests/
addEventListener('fetch', event => {
event.respondWith(noCacheOnCookie(event.request))
})
async function noCacheOnCookie(request) {
// Determine which group this request is in.
const cookie = request.headers.get('Cookie')
@vasturiano
vasturiano / README.md
Last active April 25, 2023 09:36
Zoomable Sunburst with Labels

Adapted from Mike Bostock's Zoomable Sunburst to include arc labels.

Click on any arc to zoom in. Click on the center circle to zoom out. Click on canvas background to reset zoom.

Also packaged as a reusable component at sunburst-chart.

@ferodss
ferodss / gist:5762620
Last active April 10, 2016 17:29
Compile Apache 2.4.4 with SSL, FastCGI and PHP 5.4 as FPM on CentOS for Magento store
### ADD RPM Forge repository
wget http://packages.sw.be/rpmforge-release/rpmforge-release-0.5.2-2.el6.rf.x86_64.rpm
rpm --import http://apt.sw.be/RPM-GPG-KEY.dag.txt
rpm -K rpmforge-release-0.5.2-2.el6.rf.*.rpm # Verifies the package
rpm -i rpmforge-release-0.5.2-2.el6.rf.*.rpm
### APACHE
# Dependencies
@mbostock
mbostock / .block
Last active May 4, 2023 14:15
Zoomable Sunburst
license: gpl-3.0
redirect: https://observablehq.com/@d3/d3-zoomable-sunburst
@troy
troy / save-redfin-listing-images-bashrc
Created September 10, 2009 13:22
Given a redfin.com house listing URL, save all full-size images
# usage: redfin-images "http://www.redfin.com/WA/Seattle/123-Home-Row-12345/home/1234567"
function redfin-images() {
wget -O - $1 | grep "full:" | awk -F \" '{print $4}' | xargs wget -
}