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 | |
function has-branch { | |
branch=$1 | |
git branch --no-color | grep -q " ${branch}$" | |
} | |
thisbranch() { | |
git branch --no-color | sed -r -n "s/(\* )(.*)/\2/p" | |
} |
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
func parseStuff (stuff string) () { | |
fmt.Println(stuff) | |
} | |
parseStuff(pvc) | |
outputs |
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
root@d5fe1c33ffb4:/var/www/html# php index.php | |
Fatal error: Uncaught Exception: Unable to open database: unable to open database file in /var/www/html/index.php:11 | |
Stack trace: | |
#0 /var/www/html/index.php(11): SQLite3->__construct('/var/www/html/w...', 1) | |
#1 /var/www/html/index.php(36): ServersDb->__construct() | |
#2 {main} | |
thrown in /var/www/html/index.php on line 11 | |
root@d5fe1c33ffb4:/var/www/html# pwd | |
/var/www/html |
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
def bash(cmd): | |
p = subprocess.Popen(cmd, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE) | |
stdout, stderr = p.communicate() | |
rc = p.wait() | |
return stdout, stderr, rc | |
# Run check_ssl.py | |
cmd = '/etc/ssl/private/letsencrypt/check_ssl.py %s' % domain |