Skip to content

Instantly share code, notes, and snippets.

View mureithi254's full-sized avatar

James Mureithi mureithi254

View GitHub Profile
var EmergData = $.ajax({
url: '/emergencies.json',
dataType: 'text',
success : function(data){
var geojson;
geojson = $.parseJSON(data);
//Adding custom markers to maps
var EmergencyIcon = L.icon({
@mureithi254
mureithi254 / map.js
Created November 10, 2017 12:36 — forked from lizvdk/map.js
Creating GeoJson
function drawIndexReportMap(){
L.mapbox.accessToken = "YOUR_TOKEN";
var map = L.mapbox.map("map", "lizvdk.knp8dn4m", { zoomControl: false }):
var featureLayer = L.mapbox.featureLayer().addTo(map);
featureLayer.on('layeradd', function (e) {
featureLayer.eachLayer(function(layer) {
var marker = e.layer,
@mureithi254
mureithi254 / mapdata.geojson
Last active November 9, 2017 14:05
mapdata
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@mureithi254
mureithi254 / gist:79e606f2e45d78c5652a1f76b884e475
Created March 2, 2017 19:46
After doing a git pull and starting the server this error keeps poping up
=> Booting Puma
=> Rails 5.0.1 application starting in development on http://localhost:3000
=> Run `rails server -h` for more startup options
Puma starting in single mode...
* Version 3.4.0 (ruby 2.3.3-p222), codename: Owl Bowl Brawl
* Min threads: 5, max threads: 5
* Environment: development
* Listening on tcp://localhost:3000
Exiting
/home/anonymous/.rvm/gems/ruby-2.3.3/gems/puma-3.4.0/lib/puma/binder.rb:255:in `initialize': Address already in use - bind(2) for "localhost" port 3000 (Errno::EADDRINUSE)
@mureithi254
mureithi254 / gist:8e96de2b52c5fd65fdda25a0e8cea5c7
Created February 22, 2017 09:41
classifier reborn cannot handle this file properly and needs a vector
Input: '' is entirely stopwords or words with 2 or fewer characters. Classifier-Reborn cannot handle this document properly.
/home/anonymous/.rvm/rubies/ruby-2.3.3/lib/ruby/2.3.0/matrix.rb:2088:in `normalize': Zero vectors can not be normalized (Vector::ZeroVectorError)
from /home/anonymous/.rvm/gems/ruby-2.3.3/gems/classifier-reborn-2.1.0/lib/classifier-reborn/lsi/content_node.rb:95:in `raw_vector_with'
from /home/anonymous/.rvm/gems/ruby-2.3.3/gems/classifier-reborn-2.1.0/lib/classifier-reborn/lsi.rb:326:in `node_for_content'
from /home/anonymous/.rvm/gems/ruby-2.3.3/gems/classifier-reborn-2.1.0/lib/classifier-reborn/lsi.rb:186:in `proximity_array_for_content'
from /home/anonymous/.rvm/gems/ruby-2.3.3/gems/classifier-reborn-2.1.0/lib/classifier-reborn/lsi.rb:281:in `scored_categories'
from /home/anonymous/.rvm/gems/ruby-2.3.3/gems/classifier-reborn-2.1.0/lib/classifier-reborn/lsi.rb:267:in `classify'
from Night-crawler.rb:42:in `block in comparative'
from Night-crawler.rb:41:in `each'
from Night-cra
@mureithi254
mureithi254 / RakeError2
Created February 17, 2017 14:25
Getting an error while trying to run rake db:seed
Seeded Production Data
Seeding development DB
Companies created: 201
Company Addresses created: 305
Job Categories created: 200
Skills created: 26
Company People created: 223
Jobs created: 0