start new:
tmux
start new with session name:
tmux new -s myname
| server { | |
| listen 80; | |
| listen [::]:80; | |
| server_name yourserver.com; | |
| root /path/to/your/htdocs; | |
| error_page 404 /404.html | |
| index index.html; |
| # Change YOUR_TOKEN to your prerender token and uncomment that line if you want to cache urls and view crawl stats | |
| # Change example.com (server_name) to your website url | |
| # Change /path/to/your/root to the correct value | |
| server { | |
| listen 80; | |
| server_name example.com; | |
| root /path/to/your/root; | |
| index index.html; |
| /** | |
| Code copyright Dustin Diaz and Ross Harmes, Pro JavaScript Design Patterns. | |
| **/ | |
| // Constructor. | |
| var Interface = function (name, methods) { | |
| if (arguments.length != 2) { | |
| throw new Error("Interface constructor called with " + arguments.length + "arguments, but expected exactly 2."); | |
| } | |
| this.name = name; |
| if (downloadRatio < 1.0) { | |
| self.debug.log("Download ratio is poor."); | |
| if (current > 0) { | |
| self.debug.log("We are not at the lowest bitrate, so switch down."); | |
| self.manifestExt.getRepresentationFor(current - 1, data).then( | |
| function (representation1) { | |
| self.manifestExt.getBandwidth(representation1).then( | |
| function (oneDownBandwidth) { | |
| self.manifestExt.getRepresentationFor(current, data).then( | |
| function (representation2) { |
This afternoon I encountered a race condition in an Angular app I'm working on. Essentially my controller was pushing some values to an Array on its scope and something (I wasn't sure what) was asynchronously overriding the Array's contents. The Array was being used by a custom directive- written by someone else- as well as an ngModel and it wasn't clear who was making the change.
I ended up trying something I had not done before and it worked well enough that I thought I'd post it here in case it helped anyone else.
First I enabled The "Async" option in Chrome's "Sources > Call Stack" panel.
Next I set a breakpoint in my controller where I was modifying the Array. When I hit that breakpoint, I ran the following code in my console:
Object.observe(this.theArray, function(changes) {| // by Erik Wrenholt | |
| import java.util.*; | |
| class Mandelbrot | |
| { | |
| static int BAILOUT = 16; | |
| static int MAX_ITERATIONS = 1000; | |
| private static int iterate(float x, float y) | |
| { |
| <?php | |
| return [ | |
| // http://www.cidades.ibge.gov.br/download/mapa_e_municipios.php?uf=ac (Thu May 14 16:30:15 BRT 2015) | |
| 'AC' => [ | |
| 1200013 => 'Acrelândia', | |
| 1200054 => 'Assis Brasil', | |
| 1200104 => 'Brasiléia', | |
| 1200138 => 'Bujari', | |
| 1200179 => 'Capixaba', |
| source 'https://rubygems.org' | |
| gem 'faraday' | |
| gem 'typhoeus' | |
| gem 'oj' | |
| gem 'parallel' |
This is what we did to setup a few dashboards at platanus