Skip to content

Instantly share code, notes, and snippets.

View apinstein's full-sized avatar

Alan Pinstein apinstein

  • Atlanta, GA
View GitHub Profile
@apinstein
apinstein / gist:5749468
Last active December 18, 2015 07:49
comcast performance issue 6/10/2013 @ 11AM EST plugged directly into cable modem
Cannot get to certainm parts of the internet...
google.com = bad
yahoo.com = good
My traceroute [v0.82]
Alan-Pinsteins-MacBook-Pro.local (0.0.0.0) Wed Jul 10 09:37:35 2013
Keys: Help Display mode Restart statistics Order of fields quit
Packets Pings
Host Loss% Snt Last Avg Best Wrst StDev
apache 2.2.22 upgrade
rpm --import http://yum.jasonlitka.com/RPM-GPG-KEY-jlitka
# into /etc/yum.repos.d/utterramblings.repo
[utterramblings]
name=Jason's Utter Ramblings Repo
baseurl=http://yum.jasonlitka.com/EL$releasever/$basearch/
enabled=1
gpgcheck=1
"Hostnames (A Records)
Hostname IP Address
ns2.tourbuzz.net 174.129.10.139
stl.tourbuzz.net 209.135.134.188
www0.us-east-1a.aws.tourbuzz.net 54.243.211.209
*.tourbuzz.net 54.243.211.209
staging.tourbuzz.net 54.243.60.216
db0.us-east-1a.aws.tourbuzz.net 54.243.212.52
readonly.us-east-1b.aws.tourbuzz.net 23.20.74.23
tour.tourbuzz.net 54.243.211.209
@apinstein
apinstein / gist:6858299
Last active December 24, 2015 20:29
AngularJS: how to do Ember-style computed properties in angular
// do it live: http://jsfiddle.net/apinstein/2kR2c/1/
// in DOM
<div ng-controller="MyCtrl">
<p ng-click="bumpA()">a: {{a}}</p>
<p ng-click="bumpB()">b: {{b}}</p>
<p>a^2 = {{aSquared}}</p>
<p>a + b = {{aPlusB}}</p>
</div>
@apinstein
apinstein / gist:7001494
Created October 16, 2013 01:56
run zsh without consulting any startups files
#!/bin/zsh -f
echo yay!
@apinstein
apinstein / gist:7093453
Last active December 26, 2015 04:29
Composer problem with github fork with an error message like: The requested package propel/propel1 dev-alans-propel-1.6.7.1-fork could not be found Ensure that the *master* branch of your fork is up-to-date with the remote since composer looks your fork's master:composer.json to determine the package name.
my apps' composer.json:
{
"repositories": [
{
"type": "vcs",
"url": "https://github.com/apinstein/Propel"
}
],
"require": {
"swiftmailer/swiftmailer": "v5.0.2",
@apinstein
apinstein / gist:8329337
Created January 9, 2014 04:15
trying to get iterm2 + vim + screen clipboard integration
# iterm escape code to allow clipboard integration
https://code.google.com/p/iterm2/wiki/ProprietaryEscapeCodes
# do this in a non-screen terminal, it works!
printf "\e]50;CopyToClipboard\a...followed by text followed by...\e]50;EndCopy\a" && echo && echo 'clip...' && pbpaste
# problems
1. vim --version
-> -clipboard -xterm_clipboard
2. passing thru escape sequence in screen. maybe via termcap? or some other "carve out" for that escape sequence?
$sc = ShellCommand::create()
->addCommand("echo HI")
;
$j = new RemoteShellCommandJob($sc);
$j->webhookThen(
array('MyPromiseHandler', 'success'),
array('MyPromiseHandler', 'error'),
array('MyPromiseHandler', 'notify')
);
@apinstein
apinstein / gist:a2620b2c4feeddf9cbe3
Created August 8, 2014 00:49
How to programmatically install all vundle plugins
vim '+set nomore' +BundleInstall! +BundleClean +qa
# nomore prevents the pager from getting hung at the "-- More --" prompt.
@apinstein
apinstein / gist:a2f1568863582e462239
Last active August 29, 2015 14:06
php shutdown hook to generate curl request of the current request
<?php
register_shutdown_function(function() {
$f = '/tmp/last-request-' . microtime(true) . '.sh';
$rawData = json_decode(file_get_contents("php://input"));
$url = $_SERVER['REDIRECT_SCRIPT_URI'];
$requestData = http_build_query($_REQUEST);
$postData = NULL;