This file contains 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
rem http://www.jayway.com/2014/09/03/creating-self-signed-certificates-with-makecert-exe-for-development/ | |
makecert.exe ^ | |
-n "CN=CARoot" ^ | |
-r ^ | |
-pe ^ | |
-a sha512 ^ | |
-len 4096 ^ | |
-cy authority ^ | |
-sv CARoot.pvk ^ |
This file contains 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
/* | |
https://www.hackerrank.com/challenges/matrix-rotation-algo | |
You are given a 2D matrix, a, of dimension MxN and a positive integer R. | |
You have to rotate the matrix R times and print the resultant matrix. | |
Rotation should be in anti-clockwise direction. | |
*/ | |
process.stdin.resume(); | |
process.stdin.setEncoding("ascii"); | |
_input = ""; |
This file contains 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 processData(input) { | |
var lines = input.split('\n'); | |
var tmp = lines[0].split(' ').map(x => parseInt(x)); | |
var n = tmp[0]; | |
var m = tmp[1]; | |
var coins = lines[1].split(' ').map(x => parseInt(x)).slice(0, m); | |
// sorting coins to decrease number of calls | |
coins.sort(); | |
//console.log(n, m, coins); |
This file contains 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
// https://www.hackerrank.com/challenges/maximise-sum | |
function processData(input) { | |
var lines = input.split('\n') | |
var line = 0; | |
var t = parseInt(lines[line++]); | |
for (var i = 0; i < t; i++){ | |
var tmp = lines[line++].split(' ').map(x => parseInt(x)); | |
var n = tmp[0], m = tmp[1]; | |
var arr = lines[line++].split(' ').map(x => parseInt(x)).slice(0, n); |
This file contains 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
C:\Users\VALVI\projects\github\chocolatey-test-environment>vagrant provision | |
==> default: Running provisioner: shell... | |
default: Running: shell/PrepareWindows.ps1 as c:\tmp\vagrant-shell.ps1 | |
==> default: IE Enhanced Security Configuration (ESC) has been disabled. | |
==> default: | |
==> default: IE first run welcome screen has been disabled. | |
==> default: Setting Windows Update service to Manual startup type. | |
==> default: Running provisioner: shell... | |
default: Running: shell/InstallNet4.ps1 as c:\tmp\vagrant-shell.ps1 | |
==> default: Running provisioner: shell... |
This file contains 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
[root@localhost ~]# cat /etc/httpd/conf.d/ssl.conf | |
# | |
# This is the Apache server configuration file providing SSL support. | |
# It contains the configuration directives to instruct the server how to | |
# serve pages over an https connection. For detailing information about these | |
# directives see <URL:http://httpd.apache.org/docs/2.2/mod/mod_ssl.html> | |
# | |
# Do NOT simply read the instructions in here without understanding | |
# what they do. They're here only as hints or reminders. If you are unsure | |
# consult the online docs. You have been warned. |
This file contains 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 | |
# | |
# Retrieves DoD root certificates, converts them to PEM | |
# format, and concatenates them into one big PEM file. | |
# | |
# @author DMcG | |
if [-d rootCerts]; then | |
rm -rf rootCerts | |
fi |
This file contains 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
subject=/C=US/O=U.S. Government/OU=ECA/CN=ECA Root CA | |
issuer=/C=US/O=U.S. Government/OU=ECA/CN=ECA Root CA | |
-----BEGIN CERTIFICATE----- | |
MIICmDCCAgGgAwIBAgIBDjANBgkqhkiG9w0BAQUFADBLMQswCQYDVQQGEwJVUzEY | |
MBYGA1UEChMPVS5TLiBHb3Zlcm5tZW50MQwwCgYDVQQLEwNFQ0ExFDASBgNVBAMT | |
C0VDQSBSb290IENBMB4XDTA0MDYxNDEwMjAwOVoXDTQwMDYxNDEwMjAwOVowSzEL | |
MAkGA1UEBhMCVVMxGDAWBgNVBAoTD1UuUy4gR292ZXJubWVudDEMMAoGA1UECxMD | |
RUNBMRQwEgYDVQQDEwtFQ0EgUm9vdCBDQTCBnzANBgkqhkiG9w0BAQEFAAOBjQAw | |
gYkCgYEArkr2eXIS6oAKIpDkOlcQZdMGdncoygCEIU+ktqY3of5SVVXU7/it7kJ1 | |
EUzR4ii2vthQtbww9aAnpQxcEmXZk8eEyiGEPy+cCQMllBY+efOtKgjbQNDZ3lB9 |
This file contains 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
If you enable ssl in apache, you can verify a client certificate. | |
If so apache will create a environment variable for you with the name 'SSL_CLIENT_VERIFY' with values 'NONE, SUCCESS, GENEROUS or FAILED:reason'. | |
See https://httpd.apache.org/docs/2.0/mod/mod_ssl.html | |
NONE: client has no cert | |
SUCCESS = cert is valid | |
GENEROUS = says only that some kind of certificate was sent at all | |
FAILED:reason = auth with the cert failed |
This file contains 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
subject=/C=US/O=U.S. Government/OU=DoD/OU=PKI/CN=DOD CA-27 | |
issuer=/C=US/O=U.S. Government/OU=DoD/OU=PKI/CN=DoD Root CA 2 | |
-----BEGIN CERTIFICATE----- | |
MIIFTDCCBDSgAwIBAgICAbIwDQYJKoZIhvcNAQEFBQAwWzELMAkGA1UEBhMCVVMx | |
GDAWBgNVBAoTD1UuUy4gR292ZXJubWVudDEMMAoGA1UECxMDRG9EMQwwCgYDVQQL | |
EwNQS0kxFjAUBgNVBAMTDURvRCBSb290IENBIDIwHhcNMTEwOTA4MTU1MDI1WhcN | |
MTcwOTA4MTU1MDI1WjBXMQswCQYDVQQGEwJVUzEYMBYGA1UEChMPVS5TLiBHb3Zl | |
cm5tZW50MQwwCgYDVQQLEwNEb0QxDDAKBgNVBAsTA1BLSTESMBAGA1UEAxMJRE9E | |
IENBLTI3MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAloQI/Xq6tpSD | |
0J07GQvPBN+IKp64GljrhyIqYzp/OcNra+e8GqgRAvVhzQGkmHVzxheMiTxCx+KO |