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
#!/usr/bin/env python | |
import base64 | |
import os | |
from weasyprint import CSS, HTML | |
def lambda_handler(event, context): | |
filename = event["filename"] | |
basename = os.path.basename(filename) |
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
openssl pkcs12 -in cert.pfx -nocerts -nodes | sed -ne '/-BEGIN PRIVATE KEY-/,/-END PRIVATE KEY-/p' > cert.key | |
openssl pkcs12 -in cert.pfx -clcerts -nokeys | sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p' > cert.cer | |
openssl pkcs12 -in cert.pfx -cacerts -nokeys -chain | sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p' > chain.cer |
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
const quicksort = (a) => { | |
if (a.length <= 1) { | |
return a | |
} | |
const pivot = a[0] | |
const low = [] | |
const hi = [] | |
a.map(i => { | |
i < pivot ? low.push(i) : null | |
i > pivot ? hi.push(i) : null |
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
# bastion host jump ssh | |
ssh -i key.pem -J user@host user@host |
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
locals { | |
users = [ | |
"SCREENSM1", | |
"SCREENSM2", | |
"SCREENSM3", | |
"SCREENSM4", | |
"SCREENSA1", | |
"SCREENSA2", | |
"SCREENSA3", | |
"SCREENSA4", |
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
Maximum heap size: | |
If physical memory size is up to 192 megabytes (MB) then default maximum heap size is half of the physical memory. | |
If physical memory size is more than 192 megabytes then default maximum heap size is one fourth of the physical memory. | |
Initial heap size: At least 8 MB or 1/64th of physical memory up to a physical memory size of 1 GB. | |
java -XX:+PrintFlagsFinal -version | grep HeapSize | |
The default thread stack size varies with JVM, OS and environment variables. | |
java -XX:+PrintFlagsFinal -version | grep ThreadStackSize |
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
sudo vi /Library/LaunchAgents/com.paloaltonetworks.gp.pangpa.plist | |
- Change “RunAtLoad” and “KeepAlive” to <false/> | |
sudo vi /Library/LaunchAgents/com.paloaltonetworks.gp.pangps.plist | |
- Change “RunAtLoad” to <false/> |
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
(function shadowLoop () { | |
var host = document.getElementsByTagName('host-element-containing-shadow-root)[0]; | |
if (!host) { | |
setTimeout(shadowLoop, 500); | |
} else { | |
var style = document.createElement('style'); | |
style.innerHTML = '#SomeID {display: none !important}'; | |
host.shadowRoot.appendChild(style); | |
} | |
} ()); |
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
sudo /Applications/Docker.app/Contents/MacOS/qcow-tool resize --size=$(( 12 * 1024 * 1024 * 1024 )) "/var/root/Library/Application Support/multipassd/vault/instances/blissful-glowworm/ubuntu-20.04-server-cloudimg-amd64.img" |
NewerOlder