Skip to content

Instantly share code, notes, and snippets.

View dougreese's full-sized avatar

Doug Reese dougreese

View GitHub Profile
@dougreese
dougreese / cache.log
Created June 20, 2014 22:09
Graphite carbon cache issue
Fri Jun 20 15:07:18 2014 :: Request-Cache miss [c25bc808a14db9f72a9ba40ad3094f7b]
Fri Jun 20 15:07:18 2014 :: Data-Cache miss [a5b47f762028100cba4b13c26af1dd76]
Fri Jun 20 15:07:18 2014 :: CarbonLink creating a new socket for ('127.0.0.1', None)
Fri Jun 20 15:07:18 2014 :: Server 127.0.0.1, port 7002
Fri Jun 20 15:07:18 2014 :: CarbonLink cache-query request for test.load.load.shortterm returned 1 datapoints
# good data
Fri Jun 20 15:07:27 2014 :: Request-Cache miss [c25bc808a14db9f72a9ba40ad3094f7b]
Fri Jun 20 15:07:27 2014 :: Data-Cache miss [79d47aed5e0f69f8bbf7646677ee95d1]
# good data
Fri Jun 20 15:07:28 2014 :: Request-Cache miss [c25bc808a14db9f72a9ba40ad3094f7b]
@dougreese
dougreese / apc_overloads.php
Last active October 12, 2015 08:12 — forked from aholmes/apc_overloads.php
APC replacement functions for code using apc_* user based caching functions for servers running PHP 5.5 (where APC is no longer supported) or where APC is otherwise not installed. Stores data in file based cache files.
<?php
/*
APC replacement functions
Replaces APC user cache functionality with file based caching.
Notes:
- cache files stored in result of sys_get_temp_dir()
- ttl not supported, cache files must be cleaned up manually
# GitHub commands using 'hub' https://github.com/github/hub
# To use: source alias-github
# List all milestones for a repo
list-milestones() {
hub api --cache 3600 graphql -f query='
{
repository(owner: "{owner}", name: "{repo}") {
milestones(first: 100, states: OPEN, orderBy: {field:CREATED_AT, direction:DESC}) {
edges {