This file contains hidden or 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
| find . -type d -exec chmod 755 {} \; # Change directory permissions rwxr-xr-x | |
| find . -type f -exec chmod 644 {} \; # Change file permissions rw-r--r-- |
This file contains hidden or 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
| import requests | |
| import json | |
| import ntpath | |
| url = 'https://indeed-atsdi.com/api/get_upload_url' | |
| file_names = ['current_version5.txt', 'file2.tsv'] | |
| API_KEY = 'XXXXXXXXX' | |
| headers = {'Accept': 'application/json', |
This file contains hidden or 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 | |
| #Remove dangling images | |
| docker rmi $(docker images -q -f "dangling=true") | |
| #Remove dangling volumes | |
| docker volume rm $(docker volume ls -qf dangling=true) |
This file contains hidden or 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 | |
| # Stop all containers | |
| containers=`docker ps -a -q` | |
| if [ -n "$containers" ] ; then | |
| docker stop $containers | |
| fi | |
| # Delete all containers | |
| containers=`docker ps -a -q` |
This file contains hidden or 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 checkMem(){ | |
| $fh = fopen('/proc/meminfo','r'); | |
| $mem = 0; | |
| while ($line = fgets($fh)) { | |
| $pieces = array(); | |
| if (preg_match('/^MemTotal:\s+(\d+)\skB$/', $line, $pieces)) { | |
| $mem = $pieces[1]; | |
| break; | |
| } | |
| } |