This file contains hidden or 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 | |
# RESULTS, feel free to repro yourself | |
# | |
# noLock FAIL | |
# accessShare FAIL | |
# rowShare FAIL | |
# rowExclusive FAIL | |
# shareUpdateExclusive SUCCESS | |
# share FAIL+DEADLOCKS | |
# shareRowExclusive SUCCESS |
This file contains hidden or 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
# debug performance stuff | |
SetEnvIf Request_URI ^/panel panel-request | |
LogFormat "%h %l %u %t %T \"%r\" %>s %b \"%{Referer}i\" \"%{User-agent}i\"" debug_performance | |
CustomLog /Users/alanpinstein/dev/sandbox/virtualtour/log/debug_performance_log debug_performance env=panel-request |
This file contains hidden or 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/sh | |
# This should result in very different completion times for the 2 runs. | |
# This script is useful to be sure that ionice works on your kernel since it's possible to have the | |
# ionice command yet using it has no effect | |
# you can check your scheduler with something like | |
# cat /sys/block/sda1/queue/scheduler | |
# NOTE: I wrote this to help me figure out if ionice was working on my system. It doesn't seem to be, since the | |
# output of this script indicates that the priorities, while adjusted, don't get reflected in the real world timings. | |
# I don't know if my script is wrong or if my server is mis-configured. |
This file contains hidden or 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
How S3 Permission Work | |
- The AWS account that creates a bucket owns it. | |
- The owner of a bucket can never be changed. | |
- All billing for object usage goes to bucket owner account by default. That's one reason ownership cannot be changed. | |
- Note that objects in the bucket can have permissions that would prevent even the bucket owner from editing/deleting it. | |
- There are three styles of permissions: | |
1. Bucket Policies | |
- Allows access control to be specified for AWS Accounts or IAM Users | |
- Specified in Access Policy Language | |
- Can DENY or ALLOW |
This file contains hidden or 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/sh | |
# Try this... kinda a hack but better than any other alternative I know of: | |
for i in `netstat -an | grep EST | awk '{ print $5; }' | sort | uniq | grep -v 127.0.0.1 | grep -v ::1 | sed -e 's/\([0-9]*\.[0-9]*\.[0-9]*\.[0-9]*\).*/\1/'`; echo -n "Checking IP: $i => " && dig +short -x $i && echo -n " PROCESS: " && (lsof -i | grep $i) && echo "" |
This file contains hidden or 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
zend_extension=/path/to/xdebug.so | |
; enable starting debug with XDEBUG_SESSION_START=1 | |
xdebug.remote_enable=1 | |
; enable starting profiler with XDEBUG_PROFILE=1 | |
xdebug.profiler_enable_trigger=1 | |
; good idea to do this explicitly b/c it's hard to tell where it went otherwise | |
xdebug.profiler_output_dir=/tmp/ | |
; To generate TRACES of script execution; see http://www.xdebug.org/docs/execution_trace | |
; this will happen ALWAYS (or set to 0 and use xdebug_start_trace; sadly no XDEBUG_XXX method to enable this via URL) | |
xdebug.auto_trace=0 |
This file contains hidden or 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
// Magic-ness to only run the save callback after no saves have been issued for a while | |
var executeAfter = function(f, ms) | |
{ | |
var timer; | |
var wrapper = function() | |
{ | |
var passedArguments = arguments; | |
if (timer) | |
{ | |
window.clearTimeout(timer); |
This file contains hidden or 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
After a lot of different workflows, we've finally settled on this workflow for using git internally. It offers several benefits and avoid a bunch of pitfalls we were running into. It isn't perfect for everyone, of course, but it's worked very well for us. | |
Benefits: | |
- Makes it easy to share a topic branch among multiple developers without lots of conflicts and rebase hell. | |
- Preserves logical history of "started working on topic at this point, merged it into master at this point). | |
- Still allows for frequent rebasing against master to ensure you stay up-to-date with the mainline. | |
---> master | |
+---> topic-integration (shared across users via github) | |
+----> topic-devA (local branch in devA's repo) |
This file contains hidden or 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/sh | |
# shell script quoting problem demonstration | |
# I need to be able to set a shell variable with a command with some options, like so | |
PHP_COMMAND="php -d 'include_path=/path/with spaces/dir'" | |
# then use PHP_COMMAND to run something in another script, like this: | |
$PHP_COMMAND -r 'echo get_include_path();' | |
# the above fails when executed. However, if you copy/paste the put from this line and run it in the CLI, it works! | |
echo "$PHP_COMMAND -r 'echo get_include_path();'" |