Add Current PATH to crontab
Add Current PATH to crontab Are you sick of your cron job failing because you are not explicitly listing the full path of everything in your shell script? Here’s how to fix it! Problem Your script works when you run…
Add Current PATH to crontab Are you sick of your cron job failing because you are not explicitly listing the full path of everything in your shell script? Here’s how to fix it! Problem Your script works when you run…
How to create a bash script that deletes itself This script will delete itself via the shred command (secure deletion) when it exits #!/bin/bash # # Author: Steve Stonebraker # Date: August 20, 2013 # Name: shred_self.sh # Purpose: securely…
To fix the infinite scrolling issue with byobu and Ubuntu precise install it the following way: apt-get install byobu echo “at the next prompt select ‘screen’ as the backend” byobu-select-backend
Recently I needed to calculate the starting and ending memory addresses of an IOS application (in order to dump it). As a result i needed to figure out how to add two hex addresses. Here’s what I discovered. Basic Example…
Configuration To send mail from the command line in Ubuntu Precise sudo apt-get install mailutils If you mess up configuring or want to reconfigure dpkg-reconfigure mailutils Sending your test email Let’s send a test email! echo “test email body” |…
Problems I was facing two problems with my Logstash setup Logstash service constantly required manual restarts (no longer indexing, hanging process) Local log files were filling up my root partition Symptom Logstash failed to: Index events in the queue Trim…
Here’s my bash cheat sheet: Tests Combining [ condition ] && action; # action executes if condition is true. [ condition ] || action; # action executes if condition is false. Filesystem related tests We can test different filesystem related…
I recently ran in to trouble restarting neo4j over ssh here’s the fix: From machine calling neo4j host ssh -f $USER@$HOST ‘sh -c “( (nohup sudo restart 2>&1 >output.file </dev/null) & )”‘ Target Machine Sudoers Replace “someuser” with whatever…
Recently I needed to debug an issue by testing SSL chaining issues My old standby tools (curl and openssl were not reporting any errors) The exception javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path validation failed: java.security.cert.CertPathValidatorException: Path does not chain with any of…
How can we easily download a single file from Amazon S3? Install s3cmd apt-get install ipset Setup s3cmd s3cmd –configure List your buckets and files s3cmd ls Download your file s3cmd get s3://bucket-name//file-name