Skip to content

Instantly share code, notes, and snippets.

View viztastic's full-sized avatar
🏠
Working from home

Ahmed viztastic

🏠
Working from home
View GitHub Profile
@viztastic
viztastic / Elastic Search Notes Part 1.md
Last active September 29, 2016 12:55
Quick notes to help me get my head around basics of elastic. What is an inverted index, what's a normalized index, what's tokenisation vs. normalisation etc..

Elasticsearch 101 - Inverted Index, Normalistion and Analyzers.

Examples

"The quick brown fox jumped over the lazy dog”

“Quick brown foxes leap over lazy dogs in summer”

Inverted index:

@viztastic
viztastic / Renaming Tabs in iTerm2
Last active June 19, 2016 09:25
For a while I've been trying to figure out how to label my tabs in iTerm2. Simply type in zsh at the prompt, followed by ENTER, then enter in echo -ne "\e]1;LABEL\a" where 'LABEL' is your desired tab name. And bob's your uncle.
$ zsh
$ echo -ne "\e]1;ENTER TAB NAME HERE\a"
$ exit
@viztastic
viztastic / Setting up VIM on AWS Linux AMI.md
Last active October 1, 2016 10:10
Ran into a few difficulties whilst installing Vim on my AWS Linux AMI (E.g. an error saying "checking for tgetent() vim aws linux" and another carrying on about missing ncurses-devel. Documenting the process here for reference.

Vim

(Use Git to compile VIM, not that hard once you have these two in place:)

$ sudo yum update -y
$ sudo yum group install "Development Tools"
$ sudo yum install ncurses-devel

$ git clone https://github.com/vim/vim.git
@viztastic
viztastic / Docker Node App
Last active November 22, 2015 13:19
Webserver
======
Dockerfile
======
FROM ubuntu:14.04
RUN apt-get update -y && apt-get install -y curl wget git supervisor build-essential
RUN mkdir -p /var/log/supervisor
RUN mkdir -p /data/logs
RUN cd /opt && git clone https://github.com/InconceivableDuck/Nodevember.git
RUN curl https://raw.githubusercontent.com/isaacs/nave/master/nave.sh > /opt/nave.sh
@viztastic
viztastic / Docker Mongo
Last active November 22, 2015 04:58
Setting up mongo docker container
=====================
Shortcut to stop, remove all containers and images
=====================
docker stop $(docker ps -a -q) && docker rm $(docker ps -a -q) && docker rmi $(docker images -q)
======================
Create independent directory containing Mongo setup:
======================
- Dockerfile
@viztastic
viztastic / Docker Redis
Last active November 9, 2015 10:26
Notes on Docker setup.md
=====================
Shortcut to stop, remove all containers and images
=====================
docker stop $(docker ps -a -q) && docker rm $(docker ps -a -q) && docker rmi $(docker images -q)
======================
Create independent directory containing Redis setup:
======================
- Dockerfile