Skip to content

Instantly share code, notes, and snippets.

View sabman's full-sized avatar
😀
Building, Shiping, Sharing!

Shoaib Burq sabman

😀
Building, Shiping, Sharing!
View GitHub Profile
@sabman
sabman / app.js
Created May 22, 2017 09:39 — forked from rochoa/app.js
[CARTO] Raster demos
var map = L.map('map', {
scrollWheelZoom: false,
center: [-18, -46],
zoom: 8
});
L.tileLayer('http://{s}.basemaps.cartocdn.com/light_all/{z}/{x}/{y}.png', {
attribution: '<a href="http://cartodb.com">CartoDB</a> © 2014',
maxZoom: 18
}).addTo(map);
@sabman
sabman / .block
Last active May 9, 2017 20:22 — forked from mbostock/.block
Collapsible Tree
license: gpl-3.0
@sabman
sabman / .block
Created May 9, 2017 20:17 — forked from mbostock/.block
Collapsible Tree
license: gpl-3.0
@sabman
sabman / index.html
Created May 9, 2017 20:16 — forked from d3noob/.block
D3.js tree diagram generated from external (JSON) data
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Collapsible Tree Example</title>
<style>
.node circle {
@sabman
sabman / dockerize-app.production.sh
Last active March 16, 2021 14:01
Running Rails 5.0.1 + PostGIS + puma + nginx in production using docker-compose 2 blog for this: https://medium.com/@sabman/running-rails-5-0-1-postgis-puma-nginx-in-production-using-docker-compose-2-d8d98cbef33c#.z9a3qqjar
APP_NAME=dockerized-rails
RAILS_ROOT=/usr/app/${APP_NAME}
RAILS_ENV=production
cd $APP_NAME
# Before we start we'll make sure that we have a scaffolded app just to make sure we can test everything is working.
docker-compose up
docker-compose run app bundle exec rails generate scaffold post title body:text published:boolean RAILS_ENV=development
# Blog post for this: https://medium.com/@sabman/running-rails-5-0-1-postgis-using-docker-compose-2-a0ce5e5fbaba#.j6scfvmw6
APP_NAME=dockerized-rails
rails _5.0.1_ new $APP_NAME -d postgresql
cd $APP_NAME
mkdir -p containers/development
RAILS_ENV=development
# 1. create a Dockerfile for development
cat > ./containers/development/Dockerfile <<EOF
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@sabman
sabman / .gitignore
Last active May 13, 2016 19:28 — forked from sweenzor/shapely-demo.ipynb
Shapely ipython notebook example
env/
.ipynb_checkpoints/
pointsDF.show()
---------------------------------------------------------------------------
Py4JJavaError Traceback (most recent call last)
<ipython-input-7-eac58247e7cc> in <module>()
----> 1 pointsDF.show()
/Users/shoaib/Documents/03_current_projects/Spark for Python Developers/spark-1.5.2-bin-hadoop2.6/python/pyspark/sql/dataframe.pyc in show(self, n, truncate)
254 +---+-----+
#!/bin/sh
cli=/Applications/Karabiner.app/Contents/Library/bin/karabiner
$cli set remap.simple_vi_mode 1
/bin/echo -n .
$cli set remap.simultaneouskeypresses_cmdtab_tabq 1
/bin/echo -n .
$cli set remap.windows4mac 1
/bin/echo -n .