Not sure about the origins of this phrase, but came across in a quarterly newsletter from Greenwood Investors
revenue is vanity, profit is sanity and cash-flow is reality
Not sure about the origins of this phrase, but came across in a quarterly newsletter from Greenwood Investors
revenue is vanity, profit is sanity and cash-flow is reality
That was a pretty long title for the post :). I love nginx for it’s flexibility and ease of use. It is like a swiss army knife.. can do a lot of things :).
We needed to serve some dynamic content for one of our use cases. If user visits a site using the following URL format http://example.com/23456789/678543
, we want to respond with some html content that is customized using the 23456789
and 678543
strings.
A picture might help here
Here’s how this was achieved
location ~ "^/(?<param1>[0-9]{8})/(?<param2>[0-9]{6})" {
root /var/www/html/test/;
index template.html;
sub_filter_once off;
sub_filter '_first_param_' '$param1';
sub_filter '_second_param_' '$param2';
rewrite ^.*$ /template.html break;
}
create a file named template.html with the following content in /var/www/html/test
Breaking down the config one line at a time
location ~ "^/(?<param1>[0-9]{8})/(?<param2>[0-9]{6})"
: The regex is essentially matching for the first set of digits after the / and adding that as the value for variable $param1. The first match is a series of 8 digits with each digit in the range 0-9. The second match is for a series of 6 digits with each digit in the range 0-9 and it will be added as the value for variable $param2
root /var/www/html/test/;
: Specifying the root location for the location.
index template.html;
: Specifying the home page for the location.
sub_filter_once off;
: Specify to the sub_filter module to not stop after the first match for replacing response content. By default it processes the first match and stops.
sub_filter 'first_param' '$param1';
: Direct the sub_filter module to replace any text matching first_param in the response html with value in variable $param1.
sub_filter 'second_param' '$param2';
: Direct the sub_filter module to replace any text matching second_param in the response html with value in variable $param1.
rewrite ^.*$ /template.html break;
: Specify nginx to server template.html regardless of the URI specified.
Big thanks to Igor for help with the configs!!
Loved this English translation of Я вас любил by Alexander Pushkin. One of my most favorite poems in Russian. Thought Robin Kallsen did a great job of translating it into English.
Original – In Russian
Я вас любил: любовь еще, быть может, В душе моей угасла не совсем; Но пусть она вас больше не тревожит; Я не хочу печалить вас ничем. Я вас любил безмолвно, безнадежно, То робостью, то ревностью томим; Я вас любил так искренно, так нежно, Как дай вам бог любимой быть другим.
Translation – In English
I loved you once, and love, perhaps, has not Within my soul yet wholly lost its flame; But please do not be saddened or distraught - To trouble you would drench my heart in shame. I loved you once, though lacking hope completely, By envy and timidity worn thin; I loved you so sincerely and so sweetly - Ah, may God grant you be so loved again!
Quote from “The Rebel Allocator” by Jacob L. Taylor on the return on investment from reading a book
For around ten dollars, you get to have an in-depth conversation with an expert who dedicated years to distilling all the information about a topic. For the cost of a mediocre dinner, you get access to years of another human’s effort. I did the math. If it took the author one year of work, you’re paying them about one penny per hour. How much time does this penny-per-hour investment save you in culling through information? We’re talking lifetimes.
A power quote by Abraham Lincoln. Ran across it while reading The Accidental President: Harry S. Truman and the Four Months That Changed the World . BTW, the book itself it a great read on history and leadership.
I do the very best I know how – the very best I can; and I mean to keep doing so to the end. If the end brings me out all right, what is said against me won’t amount to anything. If the end brings me out wrong, ten angels swearing I was right won’t make any difference.
Joshua Hoffman on being broadminded. Referring to how each discipline is a map/model of how to view the world..but
the map is not the territory
meaning.. don’t limit yourself to one discipline. Be curious. Explore 🙂
ADP is a $70B+ (by market cap as of August 2019) company and yet cannot get a simple redirect correct. If someone that is asked to use it’s employee performance management system types in tms.adp.com (like most people would do), they get this nice friendly error
If by some magical and mystical reason, they type in https://tms.adp.com, they get this login page
I find it mind boggling that such a mature company cannot figure out
End Rant and sorry to all my friends that work at ADP 🙂
Can’t find an attribution for this quote.. but was quoted by Harry Moseley for an interview with the Atlassian team
We have an ocean of data, but a desert of insight
I have always been a fan of crisp and clean resumes. I could never understand why anyone would have a 5+ page resume. Personally that is a turn off for me :).
Just wanted to bookmark this very effective 1 pager template from this article on CNBC (https://www.cnbc.com/2019/07/10/an-example-of-the-perfect-resume-according-to-harvard-career-experts.html?utm_source=pocket-newtab)