Skip to content

Instantly share code, notes, and snippets.

View vincentclee's full-sized avatar
🇺🇸
USA

Vincent Lee vincentclee

🇺🇸
USA
View GitHub Profile
# Generate a key valid from 2018-04-01 to 2020-03-30
We time travel using `faketime`
```
% faketime 2018-04-01 gpg --full-gen-key
gpg (GnuPG) 2.1.18; Copyright (C) 2017 Free Software Foundation, Inc.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
@pikassogod
pikassogod / ffmpeg-nvprime-build.md
Created October 25, 2019 22:24 — forked from zenofile/ffmpeg-nvprime-build.md
FFmpeg build for NVIDIA PRIME-enabled systems on Ubuntu 18.04LTS+. NVENC, QuickSync and VAAPI hwaccels are enabled.

FFmpeg build for Optimus and dual-GPU (Intel+NVIDIA) systems on Ubuntu 18.04LTS:

Build platform: Ubuntu 18.04LTS

Goals: Generate an FFmpeg build that can utilize NVENC, QuickSync and VAAPI-based hardware acceleration on NVIDIA-PRIME-based systems on Ubuntu 18.04LTS+.

Ensure the platform is up to date:

sudo apt update && sudo apt -y upgrade && sudo apt -y dist-upgrade

@mark05e
mark05e / Display-InstalledJavaVersions.ps1
Created March 4, 2019 06:52
To display all installed Java versions using powershell
# Reference: https://www.experts-exchange.com/questions/28995393/check-java-version-using-powershell.html
'', 'Wow6432Node\' |
ForEach-Object {Get-ItemProperty -Path HKLM:\SOFTWARE\$($_)Microsoft\Windows\CurrentVersion\Uninstall\* |
Where-Object {($_.DisplayName -like '*Java *') -and (-not $_.SystemComponent)} |
Select-Object DisplayName, DisplayVersion, InstallLocation, @{n='Architecture'; e={If ($_.PSParentPath -like '*Wow6432Node*') {'x86'} Else {'x64'}}}}
@mikepfeiffer
mikepfeiffer / stress.sh
Created January 27, 2019 21:05
Install Stress Utility on Amazon Linux 2
sudo amazon-linux-extras install epel -y
sudo yum install stress -y
@alexanderjsingleton
alexanderjsingleton / infosexy.md
Last active May 22, 2024 16:37
Alexander J. Singleton's InfoSexy tutorial with Hashcat
@mohanpedala
mohanpedala / bash_strict_mode.md
Last active May 23, 2024 21:36
set -e, -u, -o, -x pipefail explanation
@F21
F21 / signing-gpg-keys.md
Last active May 5, 2024 20:59
Signing someone's GPG key

This is a quick guide of the commands we use to sign someone's GPG key in a virtual key signing party.

Note: The steps cover only the technical aspects of signing someone's key. Before signing someone's key, you must verify their identity. This is usually done by showing government-issued ID and confirming the key's fingerprint

The commands will work for both GPG and GPG2.

I use Julian's key for the examples. His key id is 2AD3FAE3. You should substitute with the appropriate key id when running the commands.

Signing the key

  1. List the keys currently in your keyring: gpg --list-keys.
@arnobroekhof
arnobroekhof / example_local_file.tf
Last active September 30, 2020 14:11
Terraform 0.11.x loop through a map and create files with content based on a maps --> key, value
variable "object_list" {
type = "map"
default = {
content1 = "this is example content 1",
content2 = "this is example content 2"
}
}
resource "local_file" "local_files" {
count = "${length(var.object_list)}" # perform this action based on the amount of items in the map
@rahulmamgain
rahulmamgain / spot_price.config
Created May 12, 2018 16:11
Spot Instance Configuration Elastic Beanstalk
Resources:
AWSEBAutoScalingLaunchConfiguration:
Type: "AWS::AutoScaling::LaunchConfiguration"
Properties:
SpotPrice:
"Fn::GetOptionSetting":
Namespace: "aws:elasticbeanstalk:application:environment"
OptionName: "EC2_SPOT_PRICE"
DefaultValue: {"Ref":"AWS::NoValue"}
@richadams
richadams / pd_aws_config_event_transformer.js
Created February 9, 2018 22:55
PagerDuty Custom Event Transformer for handling AWS Config compliance events from SNS. Raising incidents if a resource goes non-compliant, and resolving the incident if they go compliant again (or are deleted).
// Parses AWS Config events from SNS and will raise PagerDuty incidents if resources
// go non-compliant, resolving the incident when they return to compliant.
//
// This file is intended to be used with a PagerDuty Custom Event Transformer.
// https://www.pagerduty.com/docs/guides/custom-event-transformer/
//
// Create a new Custom Event Transformer integration in PagerDuty, and subscribe it's
// Integration URL on the SNS Topic that you send AWS Config events to.
//
// You can see all the different notifications Config sends here: