Skip to content

Instantly share code, notes, and snippets.

View isaactzab's full-sized avatar

Isaac Levi Tzab Poot isaactzab

View GitHub Profile
@isaactzab
isaactzab / esSetup.sh
Created December 6, 2019 20:40 — forked from christeredvartsen/esSetup.sh
Setup elasticsearch on CentOS
#!/bin/bash
# Script used to setup elasticsearch. Can be run as a regular user (needs sudo)
ES_USER="elasticsearch"
ES_GROUP="$ES_USER"
ES_HOME="/usr/local/share/elasticsearch"
ES_CLUSTER="clustername"
ES_DATA_PATH="/var/data/elasticsearch"
ES_LOG_PATH="/var/log/elasticsearch"
ES_HEAP_SIZE=1024
@isaactzab
isaactzab / youtube-gif.sh
Created May 29, 2019 20:46 — forked from hubgit/youtube-gif.sh
Convert a section of a YouTube video to an animated GIF
#!/bin/bash
# brew install rtmpdump
# brew install ffmpeg
# brew install youtube-dl
# brew install imagemagick
ID='c5kuYfTCGLg' # YouTube video ID, i.e. https://www.youtube.com/watch?v={ID}
# fetch the video file with youtube-dl
@isaactzab
isaactzab / rest.py
Created March 22, 2019 16:27 — forked from tliron/rest.py
Simple and functional REST server for Python (2.7) using no dependencies beyond the Python standard library.
#!/usr/bin/env python
'''
Simple and functional REST server for Python (2.7) using no dependencies beyond the Python standard library.
Features:
* Map URI patterns using regular expressions
* Map any/all the HTTP VERBS (GET, PUT, DELETE, POST)
* All responses and payloads are converted to/from JSON for you
@isaactzab
isaactzab / mixins.jade
Created March 17, 2016 22:49 — forked from shaneriley/mixins.jade
Jade mixins example
// Writing JS for everything is great and all, but I don't want to see JS
// inline in my Jade templates. Thankfully, there are ways of abstrating it
// into mixins!
// Want some Rails-like helpers?
mixin link_to(name, href)
- href = href || "#"
a(href="#{href}")= name
// How about a single editing point for a class name?