Skip to content

Instantly share code, notes, and snippets.

View isaactzab's full-sized avatar

Isaac Levi Tzab Poot isaactzab

View GitHub Profile
isaactzab /
Created December 6, 2019 20:40 — forked from christeredvartsen/
Setup elasticsearch on CentOS
# Script used to setup elasticsearch. Can be run as a regular user (needs sudo)
isaactzab /
Last active November 8, 2019 16:44
Bash Scripting

Modify bash array items without looping

Original post from:

replace any "ba" substring with "TT" in every array item

array=( foo babar baz )
array=( "${array[@]//ba/TT}" )
echo "${orig[@]}"$'\n'"${array[@]}"
isaactzab /
Last active October 1, 2019 22:37
Terminal Helpers
# kill all proccess with name provided
if [ ! -z "${1}" ]
kill -9 $(ps aux | grep "${1}" | awk '{print $2}')
echo "Please provide an process name to kill all related process"
isaactzab /
Created May 29, 2019 20:46 — forked from hubgit/
Convert a section of a YouTube video to an animated GIF
# brew install rtmpdump
# brew install ffmpeg
# brew install youtube-dl
# brew install imagemagick
ID='c5kuYfTCGLg' # YouTube video ID, i.e.{ID}
# fetch the video file with youtube-dl
isaactzab /
Created March 22, 2019 16:27 — forked from tliron/
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.
* 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 / hashify
Created March 20, 2019 22:56
Generate passwords / hash from string / random string - Terminal OSX (with some adjusments will you run in linux)
# usage:
# 1- First argument: String seed
# 2- Second argument: Hash length
# $hashify "my string seed" 10
md5 <<< ${SEED_STRING} | base64 | awk -v lenstr="$LENGTH_STRING" '{print substr ($0, 10, lenstr)}'

Installing UfRaw

add-apt-repository ppa:dhor/myway
apt-get update
apt-get install UfRaw

isaactzab /
Last active January 24, 2021 22:40
Streaming Audio From Linux to Raspbmc
A backup from (
Posted on April 12, 2014 by matth

Streaming Audio From Linux to Raspbmc

Early in 2014, I finally got around to turning my Raspberry Pi in to a little XMBC media centre by installing Raspbmc. Which was fun. And also easy. Perhaps a little too easy: I’m a bit of a nerd, so it didn’t take long to get bored of just playing regular type media off the external hard drive. Part of the reason I have a Raspberry Pi, is for the fun of thinking of what relatively useless thing I might potentially do with it next, and then spending (wasting?) many hours trying to do it. So, as I was trying to decide what to do next, I considered the fact that I fairly often like to play music on my PC while I’m working. And my sound system is now hooked up to the Raspberry Pi. So it would be most convenient if I could just deliver the sound across my network for Raspbmc to play for me. I was running Ubuntu 13.10 – Saucy Salamander – at the tim

isaactzab /
Last active January 18, 2023 22:49
Prestashop tips and tricks

Optimizations and enhancements for prestashop 1.6

Sometimes, prestashop turns very slow due to ads, and module recomendations. Here are some modifications to version 1.6 removing these things and speed up the admin panels. Enjoy and share your tricks about how optimize prestashop.

Modify Tools class

[] Find the file /public/classes/Tools.php and modify as next:

public static function addonsRequest($request, $params = array())
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?