Skip to content

Instantly share code, notes, and snippets.

@waleedshkt
waleedshkt / React Native Clear Cache
Created June 28, 2021 20:59 — forked from jarretmoses/React Native Clear Cache
Clearing the Cache of your React Native Project
RN < 0.50 - watchman watch-del-all && rm -rf $TMPDIR/react-* && rm -rf node_modules/ && npm cache clean && npm install && npm start -- --reset-cache
RN >= 0.50 - watchman watch-del-all && rm -rf $TMPDIR/react-native-packager-cache-* && rm -rf $TMPDIR/metro-bundler-cache-* && rm -rf node_modules/ && npm cache clean && npm install && npm start -- --reset-cache
RN >= 0.63 - watchman watch-del-all && rm -rf node_modules && npm install && rm -rf /tmp/metro-* && npm run start --reset-cache
npm >= 5 - watchman watch-del-all && rm -rf $TMPDIR/react-* && rm -rf node_modules/ && npm cache verify && npm install && npm start -- --reset-cache
Windows - del %appdata%\Temp\react-native-* & cd android & gradlew clean & cd .. & del node_modules/ & npm cache clean --force & npm install & npm start -- --reset-cache
diff --git a/node_modules/react-native-maps/lib/components/Geojson.js b/node_modules/react-native-maps/lib/components/Geojson.js
index e72b56b..62fe68b 100644
--- a/node_modules/react-native-maps/lib/components/Geojson.js
+++ b/node_modules/react-native-maps/lib/components/Geojson.js
@@ -1,5 +1,7 @@
import React from 'react';
-import MapView from './MapView';
+import Marker from './MapMarker';
+import Polyline from './MapPolyline';
+import Polygon from './MapPolygon';
@waleedshkt
waleedshkt / shp2geojson.js
Created May 13, 2020 08:14 — forked from springmeyer/shp2geojson.js
shapefile to geojson in node.js with mapnik
var geojsonStream = require('geojson-stream');
var mapnik = require('mapnik');
var fs = require('fs');
var input = 'test/data/world_merc.shp';
var output = './out.geojson';
// set up geojson output stream
var fileOut = fs.createWriteStream(output);
var geojsonOut = geojsonStream.stringify();
@waleedshkt
waleedshkt / aGetPromise.js
Created May 8, 2020 06:47 — forked from benneely/aGetPromise.js
Resolving a promise within iife?
/**
* Duke Data Service API.
* REST API to the Duke Data Service. Some requests require Authentication.
*
*/
(function(root, factory) {
if (typeof define === 'function' && define.amd) {
// AMD. Register as an anonymous module.
define(['axios'], factory);
@waleedshkt
waleedshkt / d3Importer.js
Created April 26, 2020 19:17 — forked from oscarmorrison/d3Importer.js
Modularly import only the D3.js modules you require
import { line, curve, curveCatmullRom } from "d3-shape";
import { scaleTime, scaleLinear } from "d3-scale";
import { axisBottom, axisLeft } from 'd3-axis';
import { timeParse, isoFormat } from "d3-time-format";
import { select } from "d3-selection";
import { extent, max, min } from "d3-array";
export default {
line: line,
scaleTime: scaleTime,
@waleedshkt
waleedshkt / .block
Created April 21, 2020 16:42 — forked from officeofjane/.block
Date slider - with play/pause button
license: mit
@waleedshkt
waleedshkt / .block
Last active April 21, 2020 16:17
Zoom a single state with D3 v4
license: gpl-3.0
height: 250
border: no
@waleedshkt
waleedshkt / gulpfile.js
Created August 4, 2019 19:33 — forked from LoyEgor/gulpfile.js
best image compression settings (gulp-imagemin)
// install
// npm i gulp-cache gulp-imagemin imagemin-pngquant imagemin-zopfli imagemin-mozjpeg imagemin-giflossy -f
// node node_modules/jpegtran-bin/lib/install.js
// node node_modules/gifsicle/lib/install.js
// node node_modules/zopflipng-bin/lib/install.js
// node node_modules/mozjpeg/lib/install.js
// node node_modules/giflossy/lib/install.js
// node node_modules/pngquant-bin/lib/install.js
@waleedshkt
waleedshkt / index.html
Created July 6, 2018 16:32 — forked from knownasilya/index.html
Google Maps Advanced Drawing
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="initial-scale=1.0, user-scalable=no">
<meta charset="UTF-8">
<title>Drawing Tools</title>
<script type="text/javascript"
src="http://maps.google.com/maps/api/js?sensor=false&libraries=drawing"></script>
<style type="text/css">
#map, html, body {