Skip to content

Instantly share code, notes, and snippets.

@mrhyde
mrhyde / startup-time-of-zsh.md
Created February 28, 2019 00:35 — forked from laggardkernel/startup-time-of-zsh.md
Comparison of ZSH frameworks and plugin managers

Comparison of ZSH frameworks and plugin managers

Update 1: Add a FAQ section.

Original:

I've been trying different plugin mangers for months to find the fastest one. The content below is what I got. For the record, the conclusion is very subjective. But it's the truth for me. I would appreciate hearing your thoughts on this. Here it begins.

Display what I got after this long journey. (BTW, I has an SSD on my machine, the data should be much different on HDDs.)

@mrhyde
mrhyde / msys2-setup.md
Created February 27, 2019 20:53 — forked from roblogic/msys2-setup.md
MSYS2 first time setup
@mrhyde
mrhyde / coreos-docker-compose-install.sh
Last active January 2, 2017 23:47 — forked from tropicloud-2k/docker-compose-install.sh
Docker Compose on CoreOS >= 717.0.0
#!/bin/bash
mkdir -p /opt/bin
curl -L `curl -s https://api.github.com/repos/docker/compose/releases/latest \
| jq -r '.assets[].browser_download_url \
| select(contains("Linux") and contains("x86_64"))'` \
> /opt/bin/docker-compose
chmod +x /opt/bin/docker-compose
@mrhyde
mrhyde / rules.sh
Last active September 30, 2018 06:16
Basic iptables rules for web server
#!/bin/bash
# flush all chains
iptables -F
iptables -X
# set the default policy for each of the pre-defined chains
iptables -P INPUT DROP
iptables -P OUTPUT ACCEPT
iptables -P FORWARD DROP
@mrhyde
mrhyde / swap.sh
Last active August 29, 2015 14:07
Create swap file on digitalocean ubuntu droplets
#/bin/sh
# Creates a 4Gb swap image on your Droplet
# @see https://www.digitalocean.com/community/tutorials/how-to-add-swap-on-ubuntu-14-04
if [ -f /swapfile ]; then
echo "Swap file already exists."
else
sudo fallocate -l 4G /swapfile
sudo chmod 600 /swapfile
@mrhyde
mrhyde / install.sh
Last active January 22, 2016 01:40
Lightning fast LEMP installation for Debian 8
#! /bin/bash
echo "Adding dotdeb apt repositories for Nginx and PHP 7.0"
echo "deb http://packages.dotdeb.org jessie all" > /etc/apt/sources.list.d/dotdeb.list
echo "deb-src http://packages.dotdeb.org jessie all" >> /etc/apt/sources.list.d/dotdeb.list
wget -O- http://www.dotdeb.org/dotdeb.gpg | apt-key add -
echo "Adding official MariaDB repositories"
sudo apt-get install software-properties-common
sudo apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 0xcbcb082a1bb943db
sudo add-apt-repository 'deb [arch=amd64,i386] http://mariadb.mirror.nucleus.be/repo/10.1/debian jessie main'
echo "Updating apt"