Skip to content

Instantly share code, notes, and snippets.

View kepta's full-sized avatar
🐒
What

Kushan Joshi kepta

🐒
What
  • Toronto
View GitHub Profile
@kepta
kepta / config.json
Created October 21, 2015 15:01
config.json for 0.17 jspm
System.config({
baseURL: "/",
transpiler: "babel",
packageConfigPaths: [
"npm:*.json"
],
paths: {
"npm:*": "jspm_packages/npm/*"
},
@kepta
kepta / drive_left_countries.geojson
Last active June 8, 2016 06:31
A geojson containing a Feature Collection of all countries which drive on left.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@kepta
kepta / linter.md
Last active September 15, 2016 17:09

Setting up linters

Pre requisites

Basic setup

To setup a new project.

#include <stdio.h>
// #include <stack>
//
// using namespace std;
//
// void pushNeighbours(int x, int t, int *grid, stack<int> s) {
// for (int i =0 ; i < t ; i++) {
// if (grid[x][i] == 1) {
// s.push(i);
// }
@kepta
kepta / osm-edit-report-diary.md
Last active March 25, 2017 15:56
osm-edit-report-diary.md

What's cooking at Mapbox this week

As a part of our data transparency efforts at Mapbox. We created osm-edit-report which helps anyone visualize our teams contribution to OSM.

Just to give a measure, the data team added 0.3 Million objects, 0.2 Million tags and 3 thousand changesets last week.

This is how the numbers look:

objects-created

@kepta
kepta / def_param_1.js
Created November 19, 2017 07:39
default_param_1
function filterEvil(array, evil) {
evil = evil || 'darth vader';
return array.filter(item => item !== evil);
}
function filterEvil(array, evil = 'darth vader') {
return array.filter(item => item !== evil);
}
const list = [ 'luke', 'leia', 'darth vader' ];
filterEvil(list, null); // [ 'luke', 'leia', 'darth vader' ]
@kepta
kepta / def_par6.js
Last active November 19, 2017 09:01
function findEvil(array, evil = 'darth vader', respect = 'Bad ' + evil) {
if (array.find(item => item === evil)) {
return respect;
}
}
findEvil(list); // Bad darth vader;
findEvil(list, 'luke'); // Bad luke;
function whoIsEvilNow() {
if (time > 2014) {
return 'J. J. Abrams'
}
return 'darth vader';
}
function findEvil(array, evil = whoIsEvilNow()) {
return array.find(item => item === evil);
}