Skip to content

Instantly share code, notes, and snippets.

@ho3ein-mola
ho3ein-mola / gist:b7aecaab51b7ce5688ee146c06536290
Created February 27, 2018 18:59 — forked from jstrosch/gist:3190568
iptables - delete all rules/chains
#view current chains
$ iptables -L
#remove/flush all rules & delete chains
$ iptables -F
$ iptables -X
$ iptables -t nat -F
$ iptables -t nat -X
$ iptables -t mangle -F
$ iptables -t mangle -X
@ho3ein-mola
ho3ein-mola / Virtual Box Host Only Static IP.md
Created February 24, 2018 20:21 — forked from pjdietz/Virtual Box Host Only Static IP.md
VirtualBox Host-Only Adapter with Static IP

VirtualBox Host-Only Static IP

My typical setup for a development box in VirtualBox uses two NICs. The first uses NAT to allow the box to communicate with the outside world through my host computer’s network connection. (NAT is the default, so shouldn't require any setup.) The second is a "host-only" connection that allows my host and guest to interact.

To create a host-only connection in VirtualBox, start by opening the preferences in VirtualBox. Go to the "Network" tab, and addd a Host-only Network. Modify the host-only network, and disable DHCP. Make a note of the IP address. (Feel free to set the IP address as well, if you like.)

Next, assign this host-only adapter to the virtual machine. Select the VM and press "Settings". Go to the "Network" tab, and select "Adpater 2". Enable the adapter, set it to a "Host-only Adapter", and select the adpater you created above.

Temporary

@ho3ein-mola
ho3ein-mola / 1-elementary-os-apps.md
Created February 24, 2018 01:36 — forked from ankurk91/1-elementary-os-apps.md
elementary OS 0.4.1 Loki

elementaryOS Apps and Configs

Enbale PPA support

sudo apt-get update
sudo apt-get -y install software-properties-common

Install original plank dock

@ho3ein-mola
ho3ein-mola / leafletjs-example using openstreet.html
Created February 4, 2018 15:41 — forked from khahani/leafletjs-example using openstreet.html
استفاده از leaflet با openstreet
<!DOCTYPE html>
<html>
<meta charset="utf-8"/>
<head>
<link rel="stylesheet" href="https://unpkg.com/[email protected]/dist/leaflet.css" />
<script src="https://unpkg.com/[email protected]/dist/leaflet.js"></script>
<style type="text/css">
#mapid { height: 400px; }
</style>
</head>