Skip to content

Instantly share code, notes, and snippets.

View ismatim's full-sized avatar
:octocat:
in the world of words

Ismael J. Tisminetzky ismatim

:octocat:
in the world of words
View GitHub Profile
@ismatim
ismatim / .ackrc
Created June 28, 2018 13:28 — forked from kevinold/.ackrc
#ack is a tool like grep, designed for programmers with large trees of heterogeneous source code
#to install ack, see http://betterthangrep.com/
#to use ack, launch terminal (mac osx) and type 'ack <some_keywords>'
#ack will search all files in the current directory & sub-directories
#here's how I have my config file setup. this file is located on mac osx here
# ~/.ackrc
# Always sort the files
@ismatim
ismatim / tmux.conf
Created August 1, 2018 12:29 — forked from spicycode/tmux.conf
The best and greatest tmux.conf ever
# 0 is too far from ` ;)
set -g base-index 1
# Automatically set window title
set-window-option -g automatic-rename on
set-option -g set-titles on
#set -g default-terminal screen-256color
set -g status-keys vi
set -g history-limit 10000
@ismatim
ismatim / .deployment
Created March 12, 2019 11:45 — forked from CosAnca/.deployment
create-react-app azure deploy
[config]
command = bash deploy.sh

Redux higher order components

Sometimes we need to share props and behaviour between multiple components/containers. For that we can do a higher order component. Example:

Decorator component

Higher Order Component that will decorate other component:

@ismatim
ismatim / next.config.js
Created October 4, 2019 02:08 — forked from pkellner/next.config.js
Sample next.config.js for Next.js that includes environment variables, and other plugins (CSS and Image)
const withCSS = require("@zeit/next-css");
require('dotenv').config()
const path = require('path')
const Dotenv = require('dotenv-webpack')
const withImages = require('next-images')
module.exports = withCSS(withImages({
inlineImageLimit: 16384,
webpack(config, options) {
@ismatim
ismatim / ffmpegToWeb.js
Created February 17, 2020 11:30 — forked from moeiscool/ffmpegToWeb.js
FFMPEG to Web Browser with Express, Socket.IO and JSMPEG
// Shinobi (http://shinobi.video) - FFMPEG H.264 over HTTP Test
// How to Use raw H.264 (Simulated RTSP)
// 1. Start with `node ffmpegToWeb.js`
// 2. Get the IP address of the computer where you did step 1. Example : 127.0.0.1
// 3. Open VLC and "Open Network Stream".
// 4. Input the following without quotes : `http://127.0.0.1:8001/h264` and start.
var child = require('child_process');
var io = require('socket.io');
var events = require('events');
@ismatim
ismatim / regexres.md
Created May 10, 2020 22:41 — forked from ehaughee/regexres.md
Regular Expression Resources
@ismatim
ismatim / gist:11056803d079bdbb41de9c098e8ea01f
Last active September 20, 2020 02:41
vm-bhyve openbsd steps
#remember to edit the .template/openbsd.conf to set the correct version.
pkg install vm-bhyve
zfs create pool/vm
echo 'vm_enable="YES"' >> /etc/rc.conf
echo 'vm_dir="zfs:pool/vm"' >> /etc/rc.conf
vm init
cp /usr/local/share/examples/vm-bhyve/* /mountpoint/for/pool/vm/.templates/
vm switch create public
vm switch add public em0
@ismatim
ismatim / log4j.properties
Created October 27, 2020 17:04 — forked from xkr47/log4j.properties
log4j configuration with different colors for different log levels - also works with Eclipse Ansi Console: http://mihai-nita.net/2013/06/03/eclipse-plugin-ansi-in-console/
log4j.debug=false
# Default level is INFO
log4j.rootLogger=INFO,StdoutErrorFatal,StdoutWarn,StdoutInfo,StdoutDebug,StdoutTrace
# and for com.some.package.* log everything
log4j.logger.com.some.package=TRACE
log4j.appender.StdoutErrorFatal=org.apache.log4j.ConsoleAppender
log4j.appender.StdoutErrorFatal.layout=org.apache.log4j.PatternLayout
@ismatim
ismatim / install-python-alpine.sh
Created December 12, 2020 00:37
Install Python 3.x.x in Ubuntu and Alpine
#!/bin/bash
if [ -z "$VERSION" ]; then
echo 'Please specify a version. e.g, "VERSION=3.8.5 sh install-python-alpine.sh"'
exit
fi
export PYTHON_DOWNLOAD_URL=https://www.python.org/ftp/python/$VERSION/Python-$VERSION.tgz
sudo apk update