NEO4J example script
This excercise was created from FIAP - MBA - Solution Architect
#####Create Social Network Node##### CREATE (Facebook:SocialNetwork { name:'Facebook'}) CREATE (Twitter:SocialNetwork { name:'Twitter'})
#LOGSTALGIA#
#####EXAMPLE FOR WINDOW WITH CYGWIN RUNNING ONE MORE THAN SERVERS#####
ssh <USER>@<REMOTE_IP> -C tail -f <LOG_PATH> >> /tmp/log1.tmp |
ssh <USER>@<REMOTE_IP2> -C tail -f <LOG_PATH> >> /tmp/log2.tmp |
ssh <USER>@<REMOTE_IP3> -C tail -f <LOG_PATH> >> /tmp/log3.tmp |
tail -q -f /tmp/log1.tmp /tmp/log2.tmp /tmp/log3.tmp |
# TOP 10 DIRECTORY USAGE | |
du -a -h /usr/local | sort -n -r | head -n 10 |
/** | |
* Normaliza string | |
* | |
* @param s | |
* @return | |
*/ | |
public static String normalize(String s) { | |
return Normalizer.normalize(s, Form.NFD).toLowerCase().replaceAll("\\p{P}", "").replaceAll("\\s+", "-") | |
.replaceAll("\\p{InCombiningDiacriticalMarks}+", ""); | |
} |
@Grab(group='org.codehaus.groovy.modules.http-builder', module='http-builder', version='0.7.1') | |
import groovy.json.JsonSlurper | |
import groovyx.net.http.HTTPBuilder | |
import groovyx.net.http.Method | |
/** | |
* Script to clean Rundeck's Executions History | |
* | |
* Change Api Policy permition to allow execution delete |
netstat -an | awk '/tcp/ {print $6}' | sort | uniq -c |
GET _all | |
GET _cat/nodes?h=heap*&v | |
GET _cluster/health | |
GET _cluster/health?level=indices | |
GET _cluster/health?level=shards | |
GET _cluster/settings | |
GET _cluster/health?wait_for_status=green |
openssl x509 -inform DER -in YOUR_CERTIFICATE.cer -out YOUR_CERTIFICATE.crt | |
Go to /usr/local/share/ca-certificates/ | |
Create a new folder, i.e. "sudo mkdir school" | |
Copy the .crt file into the school folder | |
Make sure the permissions are OK (755 for the folder, 644 for the file) |