Skip to content

Instantly share code, notes, and snippets.

Liran Tal lirantal

Block or report user

Report or block lirantal

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@lirantal
lirantal / making-the-terminal-great-again-jsheroes.md
Created Apr 20, 2018
making-the-terminal-great-again-jsheroes.md
View making-the-terminal-great-again-jsheroes.md
What's the advantage of having a dashboard in the terminal instead of for example a webpage?

-> it’s mostly about context-switch for me. about dockly for example, it’s not just to open a webpage, you first need to run the container with the web ui, etc. I generally find it more comfortable just to say on the terminal if I can.

1. What shell do you use?
2. How did you make your terminal to look like that? :)
3.
@lirantal
lirantal / example-regex.js
Created Feb 9, 2018
How a RegEx can bring your system down
View example-regex.js
var testEmail = /^([a-zA-Z0-9])(([\-.]|[_]+)?([a-zA-Z0-9]+))*(@){1}[a-z0-9]+[.]{1}(([a-z]{2,3})|([a-z]{2,3}[.]{1}[a-z]{2,3}))$/.exec('john@example.com');
View jscodemod-import-statistics.js
const fs = require('fs');
const crypto = require('crypto');
module.exports = function transformer(file, api, options) {
const j = api.jscodeshift;
const importSource = options.importSource || '';
const importInstances = [];
j(file.source)
.find(j.ImportDeclaration)
@lirantal
lirantal / protractor_element_explorer.md
Last active Oct 3, 2018
protractor element explorer
View protractor_element_explorer.md
@lirantal
lirantal / terminal-with-powerline.sh
Last active Nov 21, 2019
Hyper terminal + Powerline 9k terminal theme for oh-my-zsh
View terminal-with-powerline.sh
# Use hyper.is or iTerm2 as terminal emulators
# Install ohmyzsh
# https://github.com/robbyrussell/oh-my-zsh
# Copy over configs from ~/.bash_profile
# For example, it may have the nvm setup or any aliases like exa=ls and cat=bat
# ~/.hyper.js configuration:
copyOnSelect: true
@lirantal
lirantal / index.js
Last active Mar 26, 2017
LicenseWatch-CLI With Blessed UI
View index.js
'use strict'
const LicenseWatch = require('licensewatch')
const blessed = require('blessed')
const blessedContrib = require('blessed-contrib')
const fs = require('fs')
const screen = blessed.screen()
var bar = blessedContrib.bar({
View MEAN.JS 2 API Server
# Packages
## Removed
* `node-inspector` not compatible with Node v7 and not required due to new V8 `debug` parameter support
* `phantomjs-prebuilt` not required for backend
## Added
* `sequelize` library for SQL-based ORM
* `mysql` library as the default SQL engine for the sequelize ORM
@lirantal
lirantal / gist:a0b5189049ffc2349ed3816c0cdf4607
Created Nov 27, 2016
Nginx Proxy Pass for API/Frontend servers
View gist:a0b5189049ffc2349ed3816c0cdf4607
nginx config: `/etc/nginx/sites-enabled/default`
```
server {
location / {
proxy_pass http://localhost:3000;
}
location /api {
View Ionic 2 - Android setup for Ubuntu 16.04
# Android SDK setup
## Install Java
```bash
sudo apt-get update
sudo dpkg --add-architecture i386
sudo apt-get install libbz2-1.0:i386
sudo apt-get install libc6:i386 libncurses5:i386 libstdc++6:i386 lib32z1
sudo apt-get install openjdk-8-jdk openjdk-8-jre
View gist:f7ac603ce82b9e5823d824c34a3ad225
# mitmproxy tool
# http://docs.mitmproxy.org/en/stable/
# installation
sudo apt-get install python-pyasn1 python-flask python-urwid python-dev libxml2-dev libxslt-dev libffi-dev python-pip libssl-dev libjpeg8-dev zlib1g-dev
pip install mitmproxy
# run
~/.local/bin/mitmproxy --host
You can’t perform that action at this time.