Disclaimer: This piece is written anonymously. The names of a few particular companies are mentioned, but as common examples only.
This is a short write-up on things that I wish I'd known and considered before joining a private company (aka startup, aka unicorn in some cases). I'm not trying to make the case that you should never join a private company, but the power imbalance between founder and employee is extreme, and that potential candidates would
Stop your running postgres server (your plist name may or may not have specified the version in it, mine had 94 in the name)
launchctl unload ~/Library/LaunchAgents/homebrew.mxcl.postgresql94.plist
Upgrade to 9.6
brew update && brew upgrade postgresql
Check your version
A curated list of AWS resources to prepare for the AWS Certifications
A curated list of awesome AWS resources you need to prepare for the all 5 AWS Certifications. This gist will include: open source repos, blogs & blogposts, ebooks, PDF, whitepapers, video courses, free lecture, slides, sample test and many other resources.
All of the below properties or methods, when requested/called in JavaScript, will trigger the browser to synchronously calculate the style and layout*. This is also called reflow or layout thrashing, and is common performance bottleneck.
Generally, all APIs that synchronously provide layout metrics will trigger forced reflow / layout. Read on for additional cases and details.
elem.offsetLeft
,elem.offsetTop
,elem.offsetWidth
,elem.offsetHeight
,elem.offsetParent
var net = require('net'); | |
var fs = require('fs'); | |
var os = require('os'); | |
var path = require('path'); | |
// Create server to listen for additional application launches | |
function listenForNewProcesses(socketPath) { | |
// create a server for listening on the socket path | |
var server = net.createServer(function(connection) { | |
connection.on('data', function(data) { |
The final result: require() any module on npm in your browser console with browserify
This article is written to explain how the above gif works in the chrome (and other) browser consoles. A quick disclaimer: this whole thing is a huge hack, it shouldn't be used for anything seriously, and there are probably much better ways of accomplishing the same.
Update: There are much better ways of accomplishing the same, and the script has been updated to use a much simpler method pulling directly from browserify-cdn. See this thread for details: mathisonian/requirify#5
Tools that read through a directory, stream or tree and create an Application Cache manifest for you.
AppCache is still a douche but luckily there are tools available to take the pain out of generating your initial manifest files:
- Grunt: grunt-manifest is currently the de facto option, but the project lead is looking for a new maintainer. In light of that grunt-appcache is an alternative in case you're looking for more active support.
- Gulp: gulp-manifest is inspired by grunt-manifest and has a similar set of options.
- Broccoli: broccoli-manifest brings manifest file compilation based on trees.
Do review what is generated. As with any automation tooling, be careful that what is being generated is what you actually intend on being cached. I generally rel
package main | |
import ( | |
"myapp/webserver/app/common" | |
"github.com/golang/glog" | |
"github.com/gorilla/mux" | |
"encoding/json" | |
"strconv" | |
"flag" | |
"fmt" |