for e in $(seq 0 1000); do sh -c "exit $e"; echo $e:$?; done
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
| package main | |
| import ( | |
| "fmt" | |
| "net/http" | |
| "strings" | |
| //"log" | |
| ) | |
| func HomeRouterHandler(w http.ResponseWriter, r *http.Request) { |
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
| wget -qO- https://my-netdata.io/kickstart-static64.sh | sh -s -- --non-interactive |
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/sh | |
| SMTP_HOST=smtp.domain.ltd | |
| SMTP_USER=user | |
| SMTP_PASSWORD=ToPs3cR3t | |
| # Edit main.cf | |
| postconf -e 'mydestination = $myhostname, localhost.$mydomain, localhost' | |
| postconf -e 'smtp_generic_maps = hash:/etc/postfix/smtp_maps' | |
| postconf -e "relayhost = $SMTP_HOST" |
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/sh | |
| cowsay $@ | lolcat -f |
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
| curl -sL https://raw.githubusercontent.com/sivel/speedtest-cli/master/speedtest.py | (python2 || python3 || python2) |
- Install OS requirements:
yum install -y openssl-devel gcc apr-devel
- Check java version:
# /opt/atlassian/jira/jre/bin/java -version
java version "1.7.0_25"
Java(TM) SE Runtime Environment (build 1.7.0_25-b15)
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 sqlite3 | |
| import yaml | |
| def dict_factory(cursor, row): | |
| d = {} | |
| for idx, col in enumerate(cursor.description): | |
| d[col[0]] = row[idx] | |
| return d |