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 | |
for i in $(cat .gitignore); do echo $i && git rm -rf --cached $i; done |
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
function showElementsOnClient(elements){ | |
// Select Elements. | |
var selectedElements = document.querySelectorAll(elements); | |
// looping through the querySelectorAll NodeList[selectedElements_lenght] | |
for (i in selectedElements){ | |
// defining selectedElements into the countedElements | |
var countedElements = selectedElements[i].innerText; |
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
# coding: utf-8 | |
import os | |
base_dir = os.walk("/dir_path") | |
for root, directory, files in base_dir: | |
for filename in files: | |
filepath = os.path.join(root, filename) | |
print (filepath) |
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
for files in *.mp3; do echo ${files}>>00\ ALBUMNAME.m3u; done |
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 |
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/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
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 | |
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
#!/bin/bash | |
ps aux | grep -e "docker" | awk '{ print $2 }' |
OlderNewer