Skip to content

Instantly share code, notes, and snippets.

alert('Hello2!');
@clintharris
clintharris / gist:c3e45b13949888f73f9fd721362917fc
Created July 7, 2017 14:07
Error on attempt to build Electron 1.7.4 (macOS 10.12)
$ python --version
Python 2.7.10
$ ./script/bootstrap.py -v
Running in verbose mode
git submodule sync --recursive
Synchronizing submodule url for 'vendor/boto'
Synchronizing submodule url for 'vendor/breakpad'
Synchronizing submodule url for 'vendor/breakpad/src'
Synchronizing submodule url for 'vendor/crashpad'
class MyDraggableList extends DraggableList {
constructor(props) {
super(props);
// We need to override and intercept calls to the _handleMouseMove() function defined in the DraggableList class.
// However, this function is NOT an instance method; we cannot simply override it. `this._handleMouseMove` is
// actually just an instance variable pointing to a function, so the way we "override" it is by modifying that
// variable to point to our custom implementation (_newHandleMouseMove) while keeping a pointer to the original
// function so we can still call it. Many Bothans died to bring us this information.
this._oldHandleMouseMove = this._handleMouseMove;
@clintharris
clintharris / routed-output.json
Last active January 1, 2016 11:29
(2013.12.26) osrm-routed response after running curl -X GET 'http://localhost:5000/viaroute?loc=52.455969,13.381344&loc=49.235919,4.026759' Compiled from 0.3.7 tag on Ubuntu 12.04, running on AWS cr1.8xlarge instance against planet.osrm.
{
"alternative_names": [[
"",
""
]],
"alternative_summaries": [{
"end_point": "Boulevard Louis Barthou",
"total_time": 37031,
"total_distance": 72963196,
"start_point": "Friedrich-Karl-Straße"
@clintharris
clintharris / osrm-routed_2013-12-26_160515_GMT.log
Created December 26, 2013 20:36
(2013.12.26) Output from osrm-routed (0.3.7 tag) on Ubuntu 12.04, running on AWS cr1.8xlarge instance against planet.osrm.
ESC[31m[warn] Process ./osrm-routed could not be locked to RAMESC[0m
[info] starting up engines, v0.3.7, compiled at Dec 18 2013, 21:40:17ESC[0m
[info] HSGR file: "planet.osrm.hsgr"ESC[0m
ESC[33m[debug] Nodes file: "planet.osrm.nodes"ESC[0m
ESC[33m[debug] Edges file: "planet.osrm.edges"ESC[0m
ESC[33m[debug] RAM file: "planet.osrm.ramIndex"ESC[0m
ESC[33m[debug] Index file: "planet.osrm.fileIndex"ESC[0m
ESC[33m[debug] Names file: "planet.osrm.names"ESC[0m
ESC[33m[debug] Timestamp file: "planet.osrm.timestamp"ESC[0m
ESC[33m[debug] Threads: 8ESC[0m
@clintharris
clintharris / osrm-prepare_2013-12-23_184850_GMT.log
Created December 26, 2013 20:30
(2013.12.26) Output from osrm-prepare (0.3.7 tag) on Ubuntu 12.04, running on AWS cr1.8xlarge instance against planet.osrm.
Started at 2013-12-23_184850_GMT
[info] Input file: planet.osrm
[info] Restrictions file: planet.osrm.restrictions
[info] Profile: profile.lua
[info] Threads: 8
[info] Importing n = 448328755 nodes 
[info] and 473405725 edges 
[info] Graph loaded ok and has 473205464 edges
[info] 214269 restrictions, 142642 bollard nodes, 538487 traffic lights
[info] Generating edge-expanded graph representation
@clintharris
clintharris / osrm-prepare_top-output.txt
Created December 23, 2013 14:52
(2013.12.23) osrm-prepare (0.3.7 tag) top output on Ubuntu 12.04, running on AWS cr1.8xlarge instance against planet.osrm. Text below shows prepare output after it has been running for over two days.
top - 14:49:49 up 5 days, 23:45, 1 user, load average: 6.29, 6.28, 6.26
Tasks: 1 total, 1 running, 0 sleeping, 0 stopped, 0 zombie
Cpu(s): 25.0%us, 0.0%sy, 0.0%ni, 75.0%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st
Mem: 251649120k total, 222631552k used, 29017568k free, 978248k buffers
Swap: 0k total, 0k used, 0k free, 112514712k cached
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
12799 ubuntu 20 0 105g 98g 4088 R 800 41.2 18590:54 osrm-prepare
@clintharris
clintharris / osrm-prepare.log
Created December 23, 2013 14:45
(2013.12.23) Output from osrm-prepare (0.3.7 tag) on Ubuntu 12.04, running on AWS cr1.8xlarge instance against planet.osrm. Text below shows prepare output after it has been running for over two days.
Sat Dec 21 12:53:26 UTC 2013
[info] Input file: planet.osrm
[info] Restrictions file: planet.osrm.restrictions
[info] Profile: profile.lua
[info] Threads: 8
[info] Importing n = 448328755 nodes 
[info] and 473405725 edges 
[info] Graph loaded ok and has 473205464 edges
[info] 214269 restrictions, 142642 bollard nodes, 538487 traffic lights
[info] Generating edge-expanded graph representation
@clintharris
clintharris / osrm-extract.log
Created December 23, 2013 14:37
(2013.12.21) Output from osrm-extract (0.3.7 tag) on Ubuntu 12.04, running on AWS cr1.8xlarge instance against planet.osm.pbf.
Fri Dec 20 20:26:17 UTC 2013
[info] Input file: planet.osm.pbf
[info] Profile: profile.lua
[info] Threads: 8
[info] Using script profile.lua
[STXXL-MSG] STXXL v1.3.1 (release)
[STXXL-MSG] 1 disks are allocated, total space: 100000 MiB
[info] Using turn restrictions
[info] Found 3 exceptions to turn restriction
[info] motorcar
@clintharris
clintharris / gist:8058040
Created December 20, 2013 17:09
Output from running: ./osrm-prepare planet.osrm > osrm-prepare.log
The following stderr showed up in the console output:
...
[warn] Edge weight large -> 869734
[warn] Edge weight large -> 6065371
[warn] Edge weight large -> 7427333
...
The following stdout was redirected to file (I let it run for two days on an EC2 cr1.8xlarge instance before finally killing it):