Skip to content

Instantly share code, notes, and snippets.

@Jmayhak
Jmayhak / get flurry data
Created June 30, 2011 00:03
pull all flurry data for your platforms
#!/usr/bin/php
<?php
// NOTE: create a folder for each metric. ./ActiveUsers and ./NewUsers and etc
$appMetrics = array('ActiveUsers', 'NewUsers', 'MedianSessionLength', 'AvgSessionLength', 'Sessions', 'RetainedUsers');
// define your platforms as listed in Flurry
$platforms = array();
@jehiah
jehiah / simulate_memcached.py
Created August 20, 2011 01:43
test script to simulate a partially reachable memcached instance
#!/bin/env python
"""
This is a test script to simulate a memcached instance on a server
that has gone south and is accepting connections, but generally not
responding.
The goal of this script is to help test/develop correct client
side settings for timeouts/failure scenarios
@ziadoz
ziadoz / awesome-php.md
Last active May 10, 2024 15:06
Awesome PHP — A curated list of amazingly awesome PHP libraries, resources and shiny things.
@Adirael
Adirael / fix-wordpress-permissions.sh
Created August 17, 2012 23:16
Fix wordpress file permissions
#!/bin/bash
#
# This script configures WordPress file permissions based on recommendations
# from http://codex.wordpress.org/Hardening_WordPress#File_permissions
#
# Author: Michael Conigliaro <mike [at] conigliaro [dot] org>
#
WP_OWNER=www-data # <-- wordpress owner
WP_GROUP=www-data # <-- wordpress group
WP_ROOT=$1 # <-- wordpress root directory
@nicolashery
nicolashery / solarized-dark.css
Last active March 25, 2022 08:38 — forked from scotu/solarized.css
Solarized theme stylesheets for Jekyll and Pygments
/* Solarized Dark
For use with Jekyll and Pygments
http://ethanschoonover.com/solarized
SOLARIZED HEX ROLE
--------- -------- ------------------------------------------
base03 #002b36 background
base01 #586e75 comments / secondary content
@kevin-smets
kevin-smets / iterm2-solarized.md
Last active July 2, 2024 12:33
iTerm2 + Oh My Zsh + Solarized color scheme + Source Code Pro Powerline + Font Awesome + [Powerlevel10k] - (macOS)

Default

Default

Powerlevel10k

Powerlevel10k

# -*- coding: utf-8 -*-
from datetime import datetime
import time
import sublime_plugin
class TimestampCommand(sublime_plugin.EventListener):
"""Expand `isoD`, `now`, `datetime`, `utcnow`, `utcdatetime`,
`date` and `time`
@tcg
tcg / .profile
Last active November 19, 2015 07:17
Some current aliases and functions from my .profile/.bashrc/.zshrc, etc
# List Git branches in order of most-recently-updated.
# https://gist.github.com/tcg/381dba155117a2e7a545
alias gitbranchesbydate="git for-each-ref --sort=-committerdate refs/heads/ --format='%(committerdate:iso8601) %09 %(refname) %09 %(authorname)' | sed -e 's-refs/heads/--'"
# Output looks like:
# 2014-06-06 12:58:53 -0500 tcg/donate_language_updates Tommy George
# 2014-06-06 10:28:04 -0500 integration Brad
# 2014-06-05 16:13:30 -0500 super_dev_branch Chris
# List files that SHOULD now be ignored by .gitignore, but might not yet be.
# Use this if you just added your .gitignore file and want to make sure that
@manifestinteractive
manifestinteractive / sniff.txt
Last active November 23, 2023 02:16
A friendly formatter for curl requests to help with debugging.
\n
============= HOST: ==========\n
\n
local_ip: %{local_ip}\n
local_port: %{local_port}\n
remote_ip: %{remote_ip}\n
remote_port: %{remote_port}\n
\n
======= CONNECTION: ==========\n
\n
@johnbillion
johnbillion / wp_mail.md
Last active June 3, 2024 13:31
WordPress Emails

WordPress Emails

This document lists all the situations where WordPress sends an email, along with how to filter or disable each email.

This documentation has moved here: https://github.com/johnbillion/wp_mail