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 / osrm.rb
Created July 14, 2012 09:19
Brew formula for building OSRM with Clang, without SCons
require 'formula'
class Osrm < Formula
head 'https://github.com/DennisOSRM/Project-OSRM', :using => :git
homepage 'https://github.com/DennisOSRM/Project-OSRM'
depends_on 'protobuf'
depends_on 'boost'
depends_on 'libzip'
depends_on 'libstxxl'
emil@emil-OptiPlex-7010:~/code/Project-OSRM$ cucumber -t @basic
Ruby version 2.0.0
Using default port 5000
Using the default profile...
@routing @basic
Feature: Basic Routing
Background: # features/testbot/basic.feature:4
Given the profile "testbot" # features/step_definitions/data.rb:1
emil@emil-OptiPlex-7010:~/code/Project-OSRM$ cucumber -t @basic
Ruby version 2.0.0
Using default port 5000
Using the default profile...
@routing @basic
Feature: Basic Routing
Background: # features/testbot/basic.feature:4
Given the profile "testbot" # features/step_definitions/data.rb:1
~/code/Project-OSRM$ (develop) rm -rf build
~/code/Project-OSRM$ (develop) rake
-- The C compiler identification is Clang 5.0.0
-- The CXX compiler identification is Clang 5.0.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
@emiltin
emiltin / gist:4162804
Created November 28, 2012 17:45
clang warnings building 7379c8c3873ade900e10a078c137006b17591d1e
In file included from Extractor/ScriptingEnvironment.cpp:27:
In file included from /usr/local/opt/boost/include/boost/foreach.hpp:78:
In file included from /usr/local/opt/boost/include/boost/range/rend.hpp:19:
In file included from /usr/local/opt/boost/include/boost/range/reverse_iterator.hpp:20:
In file included from /usr/local/opt/boost/include/boost/iterator/reverse_iterator.hpp:12:
In file included from /usr/local/opt/boost/include/boost/iterator/iterator_adaptor.hpp:15:
In file included from /usr/local/opt/boost/include/boost/iterator/iterator_facade.hpp:14:
In file included from /usr/local/opt/boost/include/boost/iterator/detail/facade_iterator_category.hpp:26:
In file included from /usr/local/opt/boost/include/boost/detail/indirect_traits.hpp:9:
In file included from /usr/local/opt/boost/include/boost/type_traits/is_pointer.hpp:24: