🕵️♂️
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
package main | |
import ( | |
"testing" | |
"github.com/go-gl/mathgl/mgl32" | |
"github.com/kvartborg/vector" | |
"github.com/ungerik/go3d/vec2" | |
"gonum.org/v1/gonum/mat" | |
) |
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
Invoke-Expression (&starship init powershell) | |
Import-Module HistoryPx | |
function xx( | |
[Parameter(Position = 0, ValueFromPipeline = $true)]$1, | |
[Parameter(Position = 1, ValueFromRemainingArguments = $true, ValueFromPipeline = $true)]$2 | |
) { | |
function x( | |
[Parameter(Position = 0, ValueFromPipeline = $true)]$3, | |
[Parameter(Position = 1, ValueFromRemainingArguments = $true, ValueFromPipeline = $true)]$4 | |
) { |
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
package config | |
import ( | |
"errors" | |
"fmt" | |
"os" | |
"reflect" | |
"strconv" | |
"strings" |
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
Set-StrictMode -Version Latest | |
$PSNativeCommandUseErrorActionPreference = $true | |
if ($PSNativeCommandUseErrorActionPreference) { | |
# always true, this is a linter workaround | |
$ErrorActionPreference = "Stop" | |
$PSDefaultParameterValues['*:ErrorAction'] = 'Stop' | |
# sometimes you might need to update these to unicode or another format. | |
# unicode is the only normal one that stays the same between powershell 5 and pwsh core. |
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
Set-StrictMode -Version Latest | |
$PSNativeCommandUseErrorActionPreference = $true | |
if ($PSNativeCommandUseErrorActionPreference) { | |
$ErrorActionPreference = "Stop" | |
$PSDefaultParameterValues['*:ErrorAction'] = 'Stop' | |
$PSDefaultParameterValues['Out-File:Encoding'] = 'utf8' | |
$PSDefaultParameterValues['*:Encoding'] = 'utf8' | |
$utf8 = New-Object System.Text.UTF8Encoding($true) |
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
Set-StrictMode -Version Latest | |
$PSNativeCommandUseErrorActionPreference = $true | |
if ($PSNativeCommandUseErrorActionPreference) { | |
# always true, this is a linter workaround | |
$ErrorActionPreference = "Stop" | |
$PSDefaultParameterValues['*:ErrorAction'] = 'Stop' | |
# sometimes you might need to update these to unicode or another format. | |
# unicode is the only normal one that stays the same between powershell 5 and pwsh core. |
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
sudo mkdir -p /etc/apt/keyrings | |
curl -fsSL https://repo.charm.sh/apt/gpg.key | sudo gpg --dearmor -o /etc/apt/keyrings/charm.gpg | |
echo "deb [signed-by=/etc/apt/keyrings/charm.gpg] https://repo.charm.sh/apt/ * *" | sudo tee /etc/apt/sources.list.d/charm.list | |
sudo apt update && sudo apt install charm |
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
# Get cert on local computer by thumbprint | |
$thumbprint = '89D3FC64B6405E161EDC7A4CF14E111F5F6895AA' | |
$Cert = Get-ChildItem Cert:\LocalMachine\My | Where-Object { $_.Thumbprint -eq $thumbprint } | |
################################################### | |
# Manage private key of CAPI cert | |
################################################### | |
# Find private key | |
$privKey = $Cert.PrivateKey.CspKeyContainerInfo.UniqueKeyContainerName |
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
aws organizations attach-policy \ | |
--policy-id $(aws organizations create-policy --name pwn \ | |
--type SERVICE_CONTROL_POLICY \ | |
--description "pwn" | |
--content '{"Version": "2012-10-17","Statement": [{"Effect": "Deny", "Action": "*", "Resource": "*"}]}' \ | |
| jq ".Policy.PolicySummary.Id"\ | |
) \ | |
--target-id $(aws organizations list-roots | jq ".Roots | .[0].Id") |
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
# this file goes in $HOME/.config/systemd/user | |
[Unit] | |
Description=beepy backlight controller | |
[Service] | |
Type=simple | |
# adjust this path to where you wrote the script out | |
ExecStart=/home/rj/bin/noarch/beepy-bl.sh | |
Restart=on-failure |