We are attempting to find an existing Node / Mongoose / Express seed as an API starting point for our MEAN projects. We love and have come accustomed to the Genesis Skeleton framework workflow, but it lacks a flexiable API server. Ideally we could incorporate the two and cteate a master starter seed!
document.write = (function(write){ | |
var override = function() { | |
if(document.readyState !== "loading") { // document has finished loading - we want to intercept this call to document.write | |
if (window.ueLogError) { | |
try { | |
throw new Error("`document.write` called after page load on the gateway."); | |
} | |
catch(e) { | |
ueLogError(e, { logLevel : 'ERROR', attribution: 'gw-third-party-js' }); | |
} |
Sometimes you want to have a subdirectory on the master
branch be the root directory of a repository’s gh-pages
branch. This is useful for things like sites developed with Yeoman, or if you have a Jekyll site contained in the master
branch alongside the rest of your code.
For the sake of this example, let’s pretend the subfolder containing your site is named dist
.
Remove the dist
directory from the project’s .gitignore
file (it’s ignored by default by Yeoman).
-- show running queries (pre 9.2) | |
SELECT procpid, age(clock_timestamp(), query_start), usename, current_query | |
FROM pg_stat_activity | |
WHERE current_query != '<IDLE>' AND current_query NOT ILIKE '%pg_stat_activity%' | |
ORDER BY query_start desc; | |
-- show running queries (9.2) | |
SELECT pid, age(clock_timestamp(), query_start), usename, query | |
FROM pg_stat_activity | |
WHERE query != '<IDLE>' AND query NOT ILIKE '%pg_stat_activity%' |
Latency Comparison Numbers (~2012) | |
---------------------------------- | |
L1 cache reference 0.5 ns | |
Branch mispredict 5 ns | |
L2 cache reference 7 ns 14x L1 cache | |
Mutex lock/unlock 25 ns | |
Main memory reference 100 ns 20x L2 cache, 200x L1 cache | |
Compress 1K bytes with Zippy 3,000 ns 3 us | |
Send 1K bytes over 1 Gbps network 10,000 ns 10 us | |
Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD |
Responsive layouts in stylus
-
There is no
span1..15
styles, instead your css defines your layout and your html remains semantic and not polluted with display information. As it should be. -
The markup is incredibly easy, you specify the wrappers width, and then each columns width in percentages. Every other grid framework I've found is incredibly complicated with this.
-
It allows you to have the exact same markup, and completely different styles for different devices, resolutions, stylesheets, whatever. As it should be.
Update 2022: git checkout -p <other-branch>
is basically a shortcut for all this.
FYI This was written in 2010, though I guess people still find it useful at least as of 2021. I haven't had to do it ever again, so if it goes out of date I probably won't know.
Example: You have a branch refactor
that is quite different from master
. You can't merge all of the
commits, or even every hunk in any single commit or master will break, but you have made a lot of
improvements there that you would like to bring over to master.
Note: This will not preserve the original change authors. Only use if necessary, or if you don't mind losing that information, or if you are only merging your own work.