- The Unix philosophy, specially the "Make each program do one thing well" [1]
- File and directory navigation/manipulation (ls, cd, mkdir, rm, rmdir, touch, cp, mv)
- ln/unlink/readlink
var parser = document.createElement('a'); | |
parser.href = "http://example.com:3000/pathname/?search=test#hash"; | |
parser.protocol; // => "http:" | |
parser.hostname; // => "example.com" | |
parser.port; // => "3000" | |
parser.pathname; // => "/pathname/" | |
parser.search; // => "?search=test" | |
parser.hash; // => "#hash" | |
parser.host; // => "example.com:3000" |
This is how to create a gpg key without any user interaction or password. This can be used in cases where the primary goal is to secure the data in transit but the gpg key can/must be stored locally without a password. An example of this is the hiera-gpg plugin which doesn't support passwords.
The below genkey-batch file will use the default which currently are RSA/RSA and 2048 bit length. See the reference link to set this to something else.
function upload_media(imgURI) { | |
var options = new FileUploadOptions(); | |
options.fileKey="file"; | |
var time = new Date().getTime(); | |
var fileName = time+".jpg"; | |
options.fileName = fileName; | |
options.mimeType ="image/jpeg"; | |
options.chunkedMode = false; | |
var uri = encodeURI("http://<your bucket name>.s3.amazonaws.com/"); |
#!/bin/bash | |
if [ $# -ne 2 ]; then | |
echo "Usage: $0 file partSizeInMb"; | |
exit 0; | |
fi | |
file=$1 | |
if [ ! -f "$file" ]; then |
import javax.xml.bind.DatatypeConverter; | |
import java.io.FileInputStream; | |
import java.io.FileNotFoundException; | |
import java.security.MessageDigest; | |
import java.security.NoSuchAlgorithmException; | |
import java.security.cert.CertificateEncodingException; | |
import java.security.cert.CertificateException; | |
import java.security.cert.CertificateFactory; | |
import java.security.cert.X509Certificate; |