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 | |
# Use certbot brewed version | |
insert_into_keychain() { | |
openssl pkcs12 -export -inkey /etc/letsencrypt/live/$1/privkey.pem -in /etc/letsencrypt/live/$1/cert.pem -certfile /etc/letsencrypt/live/$1/fullchain.pem -out /etc/letsencrypt/live/$1/letsencrypt_sslcert.p12 -passout pass:topsecret | |
SHA_NEW=`openssl pkcs12 -in /etc/letsencrypt/live/$1/letsencrypt_sslcert.p12 -nomacver -nodes -passin pass:topsecret | openssl x509 -noout -fingerprint -sha1 | cut -f2 -d'=' | sed 's/://g'` | |
if [[ $2 != $SHA_NEW ]]; then | |
# New certificate available | |
# Import into keychain |
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
<VirtualHost *:80> | |
ServerName www.example.com | |
ProxyPreserveHost On | |
SetEnv proxy-chain-auth on | |
RequestHeader set X-Forwarded-Proto "http" | |
RequestHeader set X-Forwarded-Port "80" | |
ProxyPass / http://127.0.0.1:34580/ | |
ProxyPassReverse / http://127.0.0.1:34580/ | |
</VirtualHost> |
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
@jit("float64[:], float64[:], float64[:], int64, float64, float64, float64[:]", nopython=True) | |
def cable_cost_function(angles, x1, x2, n, D2, a, memo): | |
t1 = angles[:n] | |
t2 = angles[n:] | |
cost = 0. | |
for i in range(n): | |
s1 = np.sin(t1[i]) | |
c1 = np.cos(t1[i]) | |
s2 = np.sin(t2[i]) | |
c2 = np.cos(t2[i]) |