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
@ghoranyi
ghoranyi / AWS Swarm cluster.md
Last active May 31, 2021 05:28
Create a Docker 1.12 Swarm cluster on AWS

This gist will drive you through creating a Docker 1.12 Swarm cluster (with Swarm mode) on AWS infrastructure.

Prerequisites

You need a few things already prepared in order to get started. You need at least Docker 1.12 set up. I was using the stable version of Docker for mac for preparing this guide.

$ docker --version
Docker version 1.12.0, build 8eab29e

You also need Docker machine installed.

@ramiroaznar
ramiroaznar / index.html
Last active August 2, 2017 09:31
How to add/remove legend with CARTO.js
<!DOCTYPE html>
<html>
<head>
<title>How to add/remove legend with CARTO.js</title>
<meta name="viewport" content="initial-scale=1.0, user-scalable=no" />
<meta http-equiv="content-type" content="text/html; charset=UTF-8"/>
<link rel="shortcut icon" href="http://cartodb.com/assets/favicon.ico" />
<style>
html, body, #map {
@remarkablemark
remarkablemark / Dockerfile
Last active May 17, 2024 02:03
Install node and npm with nvm using Docker.
# set the base image to Debian
# https://hub.docker.com/_/debian/
FROM debian:latest
# replace shell with bash so we can source files
RUN rm /bin/sh && ln -s /bin/bash /bin/sh
# update the repository sources list
# and install dependencies
RUN apt-get update \
Here's how to make jQuery DataTables work with npm and webpack. DT checks for AMD compatibility first
which breaks when you're using CommonJS with webpack.
Install DT core: npm install datatables.net
Install a DT style: npm install datatables.net-bs (bootstrap)
Install the imports-loader webpack plugin: https://github.com/webpack/imports-loader#disable-amd
Create a loader "exception" just for DT in webpack.config.js:
module: {
loaders: [
@chicagobuss
chicagobuss / conf_core-site.xml
Last active June 11, 2022 11:53
How to get spark 1.6.0 with hadoop 2.6 working with s3
<configuration>
<property>
<name>fs.s3a.access.key</name>
<description>AWS access key ID. Omit for Role-based authentication.</description>
<value>YOUR_ACCESS_KEY</value>
</property>
<property>
<name>fs.s3a.secret.key</name>
<description>AWS secret key. Omit for Role-based authentication.</description>
@rochoa
rochoa / README.md
Last active August 4, 2017 04:59
[CARTO] turbo-cartocss examples

Color ramps: *-fill

Basic usage

marker-fill: ramp([column_name], colorbrewer(Greens));
                  |                    |
                  v                    |
      column to calculate ramp         |
                                       v
// CSV Output
[out:csv(name, ::"lat", ::"lon")];
{{geocodeArea:CH}}->.searchArea;
// gather results
(
// query part for: “place”
(node["place"]["name"~"^.+$"](area.searchArea);)
);
out body;
FROM ubuntu:14.04
FROM ruby:2.0.0
MAINTAINER James Denman <james.denman@levvel.io>
EXPOSE 3000
ENV RUBY_MAJOR 2.2
ENV RUBY_VERSION 2.2.3
ENV RUBY_DOWNLOAD_SHA256 df795f2f99860745a416092a4004b016ccf77e8b82dec956b120f18bdc71edce
ENV RUBYGEMS_VERSION 2.5.0
@tommycarpi
tommycarpi / ipython_notebook+spark.md
Last active September 3, 2021 10:14
Link Apache Spark with IPython Notebook

How to link Apache Spark 1.6.0 with IPython notebook (Mac OS X)

Tested with

Python 2.7, OS X 10.11.3 El Capitan, Apache Spark 1.6.0 & Hadoop 2.6

Download Apache Spark & Build it

Download Apache Spark and build it or download the pre-built version.

@thekensta
thekensta / spark_s3a_instructions.sh
Created October 14, 2015 20:27
Set up Apache Spark 1.5+ with Hadoop 2.6+ s3a
# For a local environment
# Install hadoop and apache-spark via homebrew
# Apache Spark conf file
# libexec/conf/spark-defaults.conf
# Make the AWS jars available to Spark
spark.executor.extraClassPath /usr/local/Cellar/hadoop/2.7.1/libexec/share/hadoop/tools/lib/aws-java-sdk-1.7.4.jar:/usr/local/Cellar/hadoop/2.7.1/libexec/share/hadoop/tools/lib/hadoop-aws-2.7.1.jar
spark.driver.extraClassPath /usr/local/Cellar/hadoop/2.7.1/libexec/share/hadoop/tools/lib/aws-java-sdk-1.7.4.jar:/usr/local/Cellar/hadoop/2.7.1/libexec/share/hadoop/tools/lib/hadoop-aws-2.7.1.jar
# Add file