Skip to content

Instantly share code, notes, and snippets.

Avatar
🚴
👨‍💻

Ganesh R geekwhocodes

🚴
👨‍💻
View GitHub Profile
View keybase.md

Keybase proof

I hereby claim:

  • I am geekwhocodes on github.
  • I am geekwhocodes (https://keybase.io/geekwhocodes) on keybase.
  • I have a public key whose fingerprint is 96E5 5F9D 2C7B C8F5 B15F B78B CE7C 2E19 4DD9 EAC0

To claim this, I am signing this object:

@geekwhocodes
geekwhocodes / nginx.tmpl
Created Jan 8, 2019
nginx template for docker
View nginx.tmpl
{{ $CurrentContainer := where $ "ID" .Docker.CurrentContainerID | first }}
{{ define "upstream" }}
{{ if .Address }}
{{/* If we got the containers from swarm and this container's port is published to host, use host IP:PORT */}}
{{ if and .Container.Node.ID .Address.HostPort }}
# {{ .Container.Node.Name }}/{{ .Container.Name }}
server {{ .Container.Node.Address.IP }}:{{ .Address.HostPort }};
{{/* If there is no swarm node or the port is not published on host, use container's IP:PORT */}}
{{ else if .Network }}
@geekwhocodes
geekwhocodes / install_conda_linux.sh
Last active Nov 30, 2017
Install minicoda on ubuntu
View install_conda_linux.sh
mkdir miniconda && cd miniconda
wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda3.sh
chmod +x miniconda3.sh
bash miniconda3.sh -b
echo 'export PATH="$HOME/miniconda3/bin:$PATH"' >> $HOME/.bashrc
rm -r -f $HOME/miniconda
View nodeCrawler_1.js
var request = require('request');
var cheerio = require('cheerio');
var URL = require('url-parse');
var START_URL = "http://geekwhocode.in";
var SEARCH_TARGET = "NotGeekExactly";
var MAX_PAGES_TO_VISIT = 100;
var pagesVisited = {};
var pagesVisitedCount = 0;