Skip to content

Instantly share code, notes, and snippets.

View emiltin's full-sized avatar

Emil Tin emiltin

  • City of Copenhagen
  • Denmark
View GitHub Profile
@emiltin
emiltin / cph_coverage.geojson
Created August 24, 2021 14:10
cph data coverage
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@emiltin
emiltin / gem_submodule_files.rb
Created November 12, 2019 13:22
Add submodule files to gemspec
gem_dir = Pathname.new(__dir__).expand_path
`git submodule --quiet foreach pwd`.split($\).each do |submodule_path|
Dir.chdir(submodule_path) do
# for each submodule, cd to foler and get path relative to gem root folder
submodule_relative_path = Pathname.new(submodule_path).relative_path_from(gem_dir)
`git ls-files`.split($\).each do |filename|
# for each git file, prepend relative submodule path and add to spec
spec.files << submodule_relative_path.join(filename).to_s
end
end
@emiltin
emiltin / .rb
Last active August 23, 2019 11:49
Run IRB inside Async
#!/usr/bin/env ruby
require 'irb'
require 'async'
require 'async/io/protocol/line'
module IRB
# custom input class which reads from an async stream
class MyInputMethod < StdioInputMethod
emil@emil-OptiPlex-7010:~/code/osrm-backend$ cat /home/emil/code/osrm-backend/npm-debug.log
0 info it worked if it ends with ok
1 verbose cli [ '/home/emil/.nvm/versions/node/v7.7.4/bin/node',
1 verbose cli '/home/emil/.nvm/versions/node/v7.7.4/bin/npm',
1 verbose cli 'install' ]
2 info using npm@4.1.2
3 info using node@v7.7.4
4 silly loadCurrentTree Starting
5 silly install loadCurrentTree
6 silly install readLocalPackageData
@emiltin
emiltin / havneringen.geojson
Last active May 25, 2016 14:30
Havneringen GeoJSON
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@emiltin
emiltin / bike.csv
Last active August 29, 2015 14:08
bike wind
We can make this file beautiful and searchable if this error is corrected: No commas found in this CSV file in line 0.
departure;direction;bearing;wind_run;wind_speed;wind_factor;bike_speed
2014-06-20 11:41:00.236;NW;2.35619449019234;4.83;2.7;3.41532575313102;5.44186046511628
2014-06-19 08:32:03.608;WNW;2.74889357189107;11.27;6.3;4.31284228275456;4.74831881105344
2014-06-21 19:26:53.76;WNW;2.74889357189107;7.24;4;2.77062805032325;5.36146345039959
2014-06-24 14:45:39.973;NNE;1.17809724509617;7.24;4;6.68888781538172;5.76843433845426
2014-06-30 08:59:56.844;WNW;2.74889357189107;8.05;4.5;3.08060163053897;4.75669698214003
2014-08-11 09:07:28.311;SW;3.92699081698724;12.87;7.2;-9.10046427387087;5.32847546396448
2014-08-12 12:57:12.017;SW;3.92699081698724;11.27;6.3;-7.96909342397239;4.93298310558692
2014-08-13 10:25:11.525;SSW;4.31968989868597;11.27;6.3;-10.4121223314022;2.77182217694649
2014-08-15 12:19:50.744;WSW;3.53429173528852;6.44;3.6;-2.46448130443118;5.00496218473016
http://routes.ibikecph.dk/fast/viaroute?z=18&alt=false&loc=55.670178,12.565343&loc=55.705821,12.581230&instructions=true
~/code/Project-OSRM$ (feature/travel_mode) rake
[ 2%] Built target COORDLIB
[ 5%] Configuring FingerPrint.cpp
[ 5%] Built target FingerPrintConfigure
[ 8%] Configuring FingerPrint.cpp
[ 10%] Building CXX object CMakeFiles/FINGERPRINT.dir/Util/FingerPrint.cpp.o
Linking CXX static library libFINGERPRINT.a
[ 10%] Built target FINGERPRINT
[ 13%] Built target GITDESCRIPTION
[ 18%] Built target IMPORT
JSONDescriptor::Run()
RawRouteData:
PathData vector:
PathData:
node: 1
name_id: 2
segment_duration: 100
turn_instruction: 2
travel_mode: 4
develop
~/code/osrm-backend$ (develop) rake process denmark
[info] Input file: denmark.osm.pbf
[info] Profile: bicycle.lua
[info] Threads: 4
[info] Using script ../profiles/bicycle.lua
[STXXL-MSG] STXXL v1.3.1 (release)
[STXXL-ERRMSG] Warning: no config file found.
[STXXL-ERRMSG] Using default disk configuration.