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 ║ Receiver (this) ║ Argument (it) ║ Result ║ | |
╠══════════╬═════════════════╬═══════════════╬═══════════════╣ | |
║ let ║ this@MyClass ║ String("...") ║ Int(42) ║ | |
║ run ║ String("...") ║ N\A ║ Int(42) ║ | |
║ run* ║ this@MyClass ║ N\A ║ Int(42) ║ | |
║ with* ║ String("...") ║ N\A ║ Int(42) ║ | |
║ apply ║ String("...") ║ N\A ║ String("...") ║ | |
║ also ║ this@MyClass ║ String("...") ║ String("...") ║ | |
╚══════════╩═════════════════╩═══════════════╩═══════════════╝ |
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
^http(s)?://(.+\.)?(localhost(?::\d{1,50000})?|projeto-(\d{1,99}).homolog.infra(?::?\d{1,50000})?|127\.0\.0\.1(?::\d{1,50000})?)$ |
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
cat /etc/logstash/conf.d/20-nginx-filter.conf | |
filter { | |
if [syslog_program] == "nginx-access" { | |
grok { | |
match => [ "message" , "%{COMBINEDAPACHELOG}+%{GREEDYDATA:extra_fields}"] | |
overwrite => [ "message" ] | |
add_tag => [ "nginx_access" ] | |
} | |
grok { | |
match => [ "message" , "(?<timestamp>%{YEAR}[./-]%{MONTHNUM}[./-]%{MONTHDAY}[- ]%{TIME}) \[%{LOGLEVEL:severity}\] %{POSINT:pid}#%{NUMBER}: %{GREEDYDATA:errormessage}(?:, client: (?<client>%{IP}|%{HOSTNAME}))(?:, server: %{IPORHOST:server})(?:, request: %{QS:request})?(?:, upstream: \"%{URI:upstream}\")?(?:, host: %{QS:host})?(?:, referrer: \"%{URI:referrer}\")"] |
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
cat /etc/rsyslog.d/nginx.conf | |
$ModLoad imfile | |
# Default Apache Error Log | |
$InputFileName /var/log/nginx/error.log | |
$InputFileTag nginx-error-default: | |
$InputFileStateFile stat-nginx-error | |
$InputFileSeverity info | |
$InputFileFacility local3 |
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 -H "Authorization: token " 'https://api.github.com/repos/organisation/repository/pulls?state=open' | python3 -c "import sys, json; print(json.load(sys.stdin)[0]['number'])" | |
curl -u rudge:cacb049a6364adec5fdadc158ee501c6e72ebcfe 'https://api.github.com/orgs/InternetGroup/repos?page=5' | python3 -c "import sys, json; git_res = json.load(sys.stdin); [print(res['name']) for res in git_res]" >> repos | |
python3 -c "import sys, requests; git_res = requests.get('https://api.github.com/orgs/InternetGroup/repos').json(); [print(res['name']) for res in git_res]" > repos |
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
eval "redis.call('keys','00*')" 0 | |
EVAL 'local ids = redis.call("keys","00*"); return redis.call("MGET", unpack(ids));' 0 | |
EVAL 'for i, name in ipairs(redis.call("KEYS", "0*")) do redis.call("EXPIRE", name, 10); end' 0 |
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
#/usr/bin/sh | |
for i in `seq 1 $3` | |
do | |
SERVERS=$SERVERS" "$(echo $2 | sed -e "s/\XXX/$i/g") | |
done | |
cssh -l $1 $SERVERS |
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
LoggerContext context = (LoggerContext) LoggerFactory.getILoggerFactory(); | |
context.reset(); | |
JoranConfigurator configurator = new JoranConfigurator(); | |
configurator.setContext(context); | |
configurator.doConfigure(new FileInputStream(new File(env.getProperty("logging.path")))); |
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
export CLI_JENKINS="java -jar /var/cache/jenkins/war/WEB-INF/jenkins-cli.jar -s http://localhost:8080 -i /var/lib/jenkins/.ssh/id_rsa" | |
declare -a arr=("") | |
for i in "${arr[@]}" | |
do | |
if $CLI_JENKINS get-job "$i-projeto-$PROJECT_NUMBER" | |
then | |
$CLI_JENKINS delete-job "$i-projeto-$PROJECT_NUMBER" | |
fi |
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 | |
#sudo update-alternatives --config java | |
DEFAULT_JAVA="7" | |
if [ ! -z $1 ]; then | |
DEFAULT_JAVA=$1 | |
fi | |
export JAVA_HOME=/usr/lib/jvm/java-$DEFAULT_JAVA-oracle/jre |
NewerOlder