Skip to content

Instantly share code, notes, and snippets.

View Mixie-12's full-sized avatar

Mixie-12

View GitHub Profile
@oodavid
oodavid / README.md
Last active June 12, 2024 00:28 — forked from aronwoost/README.md
Deploy your site with git

Deploy your site with git

This gist assumes:

  • you have a local git repo
  • with an online remote repository (github / bitbucket etc)
  • and a cloud server (Rackspace cloud / Amazon EC2 etc)
    • your (PHP) scripts are served from /var/www/html/
    • your webpages are executed by apache
  • apache's home directory is /var/www/
@heartshare
heartshare / proxmox_virtual_environment_your_own_private_cloud.md
Created November 24, 2015 08:23
Proxmox Virtual Environment: Your Own Private Cloud

You've probably heard of terms such as KVM and OpenVZ, but until now, large data center virtualization operations were beyond the reach of most individuals or small organizations. In addition, many individuals and organizations face challenges with data privacy relating to having personal or customer data in a public cloud. A relatively simple and inexpensive solution is to run your own private cloud infrastructure inside your firewall.

Proxmox Virtual Environment (PVE) is based on Kernel-based Virtual Machine (KVM) hypervisor and OpenVZ, a solution for container based virtualization. PVE is easy to install and configure. Using its wizard installation and configuration and web-based management interface and consoles, you can have an easy-to-use virtualization environment in under an hour even if you have little experience in virtualization. PVE is made by Proxmox Server Solutions GmbH is a privately held corporation based in Vienna, Austria.

Once installed and configured, you can choose from a variety of ea

@beeman
beeman / remove-all-from-docker.sh
Created November 15, 2016 03:04
Remove all from Docker
# Stop all containers
docker stop `docker ps -qa`
# Remove all containers
docker rm `docker ps -qa`
# Remove all images
docker rmi -f `docker images -qa `
# Remove all volumes
@darkdreamingdan
darkdreamingdan / Add Bash to Context Menu.reg
Created September 2, 2017 23:13
Adds 'Open Bash here' to your Windows Context menu for WSL. Based on a registry key from winaero, only this opens `bash.exe` natively so that it appears in the same program group in the start menu as when using `bash.exe` in Start->Run, and also inherits the Ubuntu taskbar icon.
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\SOFTWARE\Classes\Directory\shell\openbashhere]
@="Open Bash here"
"Icon"=hex(2):25,00,55,00,53,00,45,00,52,00,50,00,52,00,4f,00,46,00,49,00,4c,\
00,45,00,25,00,5c,00,41,00,70,00,70,00,44,00,61,00,74,00,61,00,5c,00,4c,00,\
6f,00,63,00,61,00,6c,00,5c,00,6c,00,78,00,73,00,73,00,5c,00,62,00,61,00,73,\
00,68,00,2e,00,69,00,63,00,6f,00,00,00
[HKEY_CURRENT_USER\SOFTWARE\Classes\Directory\shell\openbashhere\command]
@ntamvl
ntamvl / disk-speed-test-read-write-hdd-ssd-perfomance-linux.md
Created May 4, 2018 08:25
Disk Speed Test (Read/Write): HDD, SSD Performance in Linux

Disk Speed Test (Read/Write): HDD, SSD Performance in Linux

From this article you’ll learn how to measure an input/output performance of a file system on such devices as HDD, SSD, USB Flash Drive etc.

I’ll show how to test the read/write speed of a disk from the Linux command line using dd command.

I’ll also show how to install and use hdparm utility for measuring read speed of a disk on Linux Mint, Ubuntu, Debian, CentOS, RHEL.

Take the average result: To get the accurate read/write speed, you should repeat the below tests several times (usually 3-5) and take the average result.

#!/bin/bash
# Dynamically retrieves and add IPs from a list of domain names
# Creates a cache folder with IP as filenames to know if they have been added previously
# Manages both IPv4 and IPv6 rules.
MAIN_INTERFACE=$(ip -4 route ls | grep default | grep -Po '(?<=dev )(\S+)' | head -1)
THIS_DIR="$(cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd)"
CACHE_DIR="$THIS_DIR/.ips"
function is_ipv4()