Skip to content

Instantly share code, notes, and snippets.

View skl's full-sized avatar

Stephen Lang skl

View GitHub Profile
@c3mdigital
c3mdigital / class-microcache-purge.php
Created November 16, 2012 05:39
WordPress Nginx Multisite Configuration with Nginx Microcahing
/**
* Micro Cache Purge PHP Class
* Sends a request header to nginx to purge the microcache when post are created or updated
* Include this file at plugins_loaded or in theme functions.php
*/
new Micro_Cache_Purge();
class Micro_Cache_Purge {
@mattratleph
mattratleph / vimdiff.md
Last active March 17, 2025 13:07 — forked from roothybrid7/vimdiff_cheet.md
vimdiff cheat sheet

vimdiff cheat sheet

##git mergetool

In the middle file (future merged file), you can navigate between conflicts with ]c and [c.

Choose which version you want to keep with :diffget //2 or :diffget //3 (the //2 and //3 are unique identifiers for the target/master copy and the merge/branch copy file names).

:diffupdate (to remove leftover spacing issues)

:only (once you’re done reviewing all conflicts, this shows only the middle/merged file)

@ushkinaz
ushkinaz / cygwin-mirror-speed.py
Last active February 22, 2025 23:45
Tests HTTP mirrors of Cygwin by measuring download times.
#!/usr/bin/env python3
"""
Script to test HTTP mirrors of Cygwin by measuring download times.
Originally written in 2011, modernized in 2025.
"""
from math import floor
from urllib.request import urlopen
import argparse
import sys
@augustohp
augustohp / cmd_osx_apc_php53.sh
Created August 7, 2011 23:56
APC installation for OSX
#!/bin/bash
#
# Downloads and install latest APC extension to OSX php (Zend Server).
# Tested under OSX 10.6.7, more feedback is appreciated.
#
# OSX is 64bit but the PHP binary in Zend Server is compiled in 32bit mode only,
# so to have APC working with Zend Server on OSX statically compiling it with default
# recommended flags and forced i386 architecture.
# I suppose that Zend Server's binary path is already into your PATH variable and it
# is used before the native PHP binary bundled with OSX.
@140bytes
140bytes / LICENSE.txt
Created May 9, 2011 16:13
140byt.es -- Click ↑↑ fork ↑↑ to play!
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2011 YOUR_NAME_HERE <YOUR_URL_HERE>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE