Skip to content

Instantly share code, notes, and snippets.

@tzutalin
tzutalin / removeCertainSearchEngine
Last active Mar 26, 2020
js script to remove all other search engines in chrome
View removeCertainSearchEngine
removedName = ['groupon',
'avg',
'red',
'Jenkins',
'petewarden',
'booking',
'Hudson',
'blog',
'ebay',
@tzutalin
tzutalin / settings.json
Created Aug 31, 2019
VSCode Global Settings
View settings.json
{
"files.exclude": {
"**/.git": true,
"**/.svn": true,
"**/.hg": true,
"**/.DS_Store": true,
".idea": true,
"bower_components": true,
"dist": true,
"tmp": true
@tzutalin
tzutalin / autojump.py
Last active Nov 6, 2020
Ranger's settings and plugins
View autojump.py
# config/ranger/plugins/autojump.py
import ranger.api
import subprocess
from ranger.api.commands import *
HOOK_INIT_OLD = ranger.api.hook_init
def hook_init(fm):
def update_autojump(signal):
@tzutalin
tzutalin / install_cv_anaconda.sh
Created Jun 10, 2018
Ubuntu install opencv + anacoda
View install_cv_anaconda.sh
#!/bin/sh
# ubuntu install opencv + anaconda
# anaconda
curl -O https://repo.continuum.io/archive/Anaconda3-4.3.1-Linux-x86_64.sh
sha256sum Anaconda3-4.3.1-Linux-x86_64.sh
bash Anaconda3-4.3.1-Linux-x86_64.sh
# paste the below to bashrc
export PATH=~/anaconda3/bin:$PATH
@tzutalin
tzutalin / iterm2-solarized.md
Created Jun 8, 2018 — forked from kevin-smets/iterm2-solarized.md
iTerm2 + Oh My Zsh + Solarized color scheme + Meslo powerline font + [Powerlevel9k] - (macOS)
View iterm2-solarized.md

Default

Default

Powerlevel9k

Powerlevel9k

View wifiadb.sh
#!/bin/sh
# Author : tzu.ta.lin@gmail.com
# Copyright [2015] <tzu.ta.lin@gmail.com>
PORT=5555
if [ $# -ne 0 ]; then
while [ $# != 0 ]
do
PORT=$1
@tzutalin
tzutalin / nginxproxy.md
Created Aug 7, 2017 — forked from soheilhy/nginxproxy.md
How to proxy web apps using nginx?
View nginxproxy.md

Virtual Hosts on nginx (CSC309)

When hosting our web applications, we often have one public IP address (i.e., an IP address visible to the outside world) using which we want to host multiple web apps. For example, one may wants to host three different web apps respectively for example1.com, example2.com, and example1.com/images on the same machine using a single IP address.

How can we do that? Well, the good news is Internet browsers

View basic-tools.yaml
---
- name: Installl packages for localhost
hosts: "{{ cluster_name }}"
#hosts: all
become: true
tasks:
@tzutalin
tzutalin / _readme.md
Created Jul 28, 2017 — forked from maxivak/_readme.md
Vagrant with Ubuntu 16.04 in VirtualBox
View _readme.md

Setup Ubuntu 16.04 to be used with Vagrant and Virtualbox

Prepare Vagrant box with Ubuntu 16.04

We will use official box "ubuntu/xenial64" and modify it to work with Vagrant.

  • Vagrantfile
View ubuntu16.sh
sudo apt-get update
sudo apt-get install -y virtualbox-guest-dkms virtualbox-guest-utils virtualbox-guest-x11
sudo apt-get -y install git
sudo apt-get -y install -y ant
sudo apt-get -y install g++
sudo apt-get -y install ipython
sudo apt-get -y install python2.7-dev python-pip
sudo apt-get -y install geany tree meld