This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
''' | |
This is a module that defines some helper classes and functions for | |
expiring groups of related keys at the same time. | |
Written July 1-2, 2013 by Josiah Carlson | |
Released into the public domain | |
''' | |
import time |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
UPDATE_ELB_POLICY=${UPDATE_ELB_POLICY:-0}; | |
TMPFILE=`mktemp -t example.XXXXXXXXXX` && { | |
printf "Region|Status|Current security policy|Expected security policy|ELB|Action\n" >> "${TMPFILE}"; | |
aws ec2 describe-regions |awk -F'"' '/RegionName/ {print $4}' | while read region; do | |
LATEST_PREDEFINED_SECURITY_GROUP=$(aws --region=$region elb describe-load-balancer-policies | grep -i PolicyName | awk -F '"' '{print $4}' | head -n1 | sed 's/[ \r\n]//g'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
177 read,my_real_read,my_net_read,do_command,do_handle_one_connection,handle_one_connection,start_thread,clone | |
8 pthread_cond_wait@@GLIBC_2.3.2,inline_mysql_cond_wait,optimized,optimized,do_handle_one_connection,handle_one_connection,start_thread,clone | |
4 __lll_lock_wait_private,_L_lock_9495,malloc,mem_heap_create_block,mem_heap_create_func,row_sel_store_mysql_rec,row_search_for_mysql,ha_innobase::general_fetch,join_read_next_same,sub_select,do_select,JOIN::exec,mysql_select,handle_select,execute_sqlcom_select,mysql_execute_command,mysql_parse,dispatch_command,do_handle_one_connection,handle_one_connection,start_thread,clone | |
3 __lll_lock_wait_private,_L_lock_5189,_int_free,mem_heap_block_free,mem_heap_free_func,row_sel_store_mysql_rec,row_search_for_mysql,ha_innobase::general_fetch,handler::read_multi_range_next,QUICK_RANGE_SELECT::get_next,rr_quick,sub_select,do_select,JOIN::exec,mysql_select,handle_select,execute_sqlcom_select,mysql_execute_command,mysql_parse,dispatch_command,do_handle |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function get_hottest_cities( $force = false ) { | |
$hottest_cities = get_transient( 'zdt-hottest-cities' ); | |
if ( false === $hottest_cities || $force ) { | |
if ( $force ) { | |
$hottest_cities = retrieve_hottest_cities(); | |
if ( $hottest_cities ) { | |
set_transient( 'zdt-hottest-cities', $hottest_cities ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
echo "This script will rebuild a Debian style package (deb) of latest stable" | |
echo "Nginx. The original deb is from nginx.org apt repository." | |
echo | |
echo "This will prompt you yes or no on a few changes to the build as well as" | |
echo "it will compile and package the latest Google NGX Pagespeed module." | |
echo | |
echo "This is built and tested on Ubuntu 14.04 LTS, fresh OS install." | |
echo "There are no guarantees, and I take no liability if it breaks, but it" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
* Plugin Name: Lock plugin updates | |
* Description: Prevent plugin updates | |
* Version: 1.0.0 | |
* Author: daggerhart | |
*/ | |
add_filter( 'http_request_args', 'lock_plugins_http_request_args', 5, 2 ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
require 'rubygems' | |
require 'friendly' | |
Friendly.configure( | |
:adapter => 'mysql', | |
:host => 'localhost', | |
:user => 'root', | |
:password => '', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Usage: redis-cli publish message.achannel hello | |
require 'sinatra' | |
require 'redis' | |
conns = Hash.new {|h, k| h[k] = [] } | |
Thread.abort_on_exception = true | |
get '/' do |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Usage: redis-cli publish message.achannel hello | |
require 'sinatra' | |
require 'redis' | |
conns = Hash.new {|h, k| h[k] = [] } | |
Thread.abort_on_exception = true | |
get '/' do |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
module.exports = function (context) { | |
var fs = require('fs'); | |
var _ = require('lodash'); | |
var scheme = 'flowkey'; | |
var insertIntent = '\n <intent-filter>\n <action android:name="android.intent.action.VIEW"></action>\n <category android:name="android.intent.category.DEFAULT"></category>\n <category android:name="android.intent.category.BROWSABLE"></category>\n <data android:scheme="' + scheme + '"></data>\n </intent-filter>\n '; | |
var manifestPath = context.opts.projectRoot + '/platforms/android/AndroidManifest.xml'; | |
var androidManifest = fs.readFileSync(manifestPath).toString(); |