(env) ~/sibunglon/gist ❯❯❯ ansible-playbook main.yml
PLAY [localhost] *******************************************************************************************************************************************************************************************
TASK [Load Variable 1] *************************************************************************************************************************************************************************************
ok: [localhost] => {
"msg": "example.com/x"
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
xargs -n 1 curl -O < urls.txt |
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
pscp -pw yourpassword file user@server:locate |
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 run --name sql-server -d -it -e 'ACCEPT_EULA=Y' -e 'SA_PASSWORD=Str0ng.Password' -e 'MSSQL_PID=Express' -p 1433:1433 mcr.microsoft.com/mssql/server:2017-latest-ubuntu |
- Create new file cockpit.conf on
/etc/cockpit
, and enter following script in tocockpit.conf
.
[WebService]
AllowUnencrypted=true
- Update or Create new file conf nginx for access cockpit.
map $http_upgrade $connection_upgrade {
default upgrade;
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
import os | |
def createFolder(directory): | |
try: | |
if not os.path.exists(directory): | |
os.makedirs(directory) | |
except OSError: | |
print ('Error: Creating directory. ' + directory) | |
$ npm ls -gp --depth=0 | awk -F/ '/node_modules/ && !/\/npm$/ {print $NF}' | xargs npm -g rm
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
import time | |
def get_time(): | |
print (time.strftime('%m-%d-%Y %H:%M:%S')) | |
get_time() |
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 {11..20} | |
do | |
sudo timedatectl set-time "2020-07-$i 09:00:00" | |
echo "time now 2020-07-$i" | |
sleep 300 | |
done |