This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# installing dependencies | |
apt-get install -y apt-transport-https ca-certificates curl gnupg2 software-properties-common | |
# Adding docker keys to apt-keys | |
curl -fsSL https://download.docker.com/linux/debian/gpg | apt-key add - | |
# Verifying the docker figerprint | |
apt-key fingerprint 0EBFCD88 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# Created By: misraX | |
# Github: github.com/misrax | |
# License: MIT | |
# CopyWrite: 2017 | |
# Bash script to install and generate pip requirements.txt from inside a virtualenv. | |
# By using pip freeze to creat a list of all the virtualenviroment pip packeges. | |
# It's just a simple way of creating the pip requirements.txt for a development use. | |
# usage pip-install package1 package2 package3 .. package(n)... etc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
replace all home/user --> vim way: home\/user\/ | |
to --> vim way: / | |
var/www/example.com/public_html --> vim way: var\/ww\/example.com\/public_html\/ | |
all --> vim way: /g | |
will be: | |
:%s/home\/user\//var\/www\/example.com\/public_html\//g |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Created By: misraX | |
# Github: github.com/misrax | |
# License: MIT | |
# CopyWrite: 2017 | |
# A very basic shell script. | |
# Tested in archlinux | |
# kernel: 4.11.9-1-ARCH, cpupower: 4.12-1, bash: 4.4.12 | |
# To control the frequency of my Lynnfield Core i5 760 CPU. In a very hot weather :D |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
ps aux | grep -e "docker" | awk '{ print $2 }' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!bin/bash | |
docker stop $(echo $(docker container ps | awk ' | |
{ | |
i = 1 | |
# ingore CONTAINER ID from the output | |
if ( ! /^CONT/ ) | |
{ | |
print $i | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pkgname=mutter | |
pkgver=3.24.1+2+gbb481fafd | |
pkgrel=1 | |
pkgdesc="A window manager for GNOME" | |
url="https://git.gnome.org/browse/mutter" | |
arch=(i686 x86_64) | |
license=(GPL) | |
depends=(dconf gobject-introspection-runtime gsettings-desktop-schemas | |
libcanberra startup-notification zenity libsm gnome-desktop upower | |
libxkbcommon-x11 gnome-settings-daemon libgudev libinput) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
ip=172.17.0.2 | |
port=8080 | |
iptables -t nat -A DOCKER -p tcp --dport $(port) -j DNAT --to-destination $(ip):$(port) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
### | |
# socat container to forward tcp ports from system wide running containers or network services | |
### | |
# Define the ip | |
ip=172.17.0.2 | |
# Define port number | |
port=8080 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
##### | |
#mmm, misraX | |
##### Automatically stop all docker containers ########## | |
# Loop over containeres, awk the first col "CONTAINER" | |
# exclude the string that start with ! /CONT/ to exclude CONTAINER ID | |
# as it's an invalid container ID. | |
for i in $(docker ps | awk '! /CONT/ {print $1}') | |
do |