Skip to content

Instantly share code, notes, and snippets.

View WolfangAukang's full-sized avatar
🇵🇸
GitHub fariĝis banala interkona retejo

P. WolfangAukang

🇵🇸
GitHub fariĝis banala interkona retejo
View GitHub Profile
use aws_config::{meta::region::RegionProviderChain, BehaviorVersion, SdkConfig};
use aws_sdk_ec2::Client;
const DEFAULT_REGION: &str = "us-east-1";
const INSTANCE_ID_STATUS: &str = "i-0d10de49d69d7ed57";
const INSTANCE_ID_START: &str = "i-06360477f59dd461d";
enum InstanceStatus {
IP,
Status,
{
"json": {
},
"markdown": {
"lineWidth":120,
},
"excludes": [
],
"plugins": [
"https://plugins.dprint.dev/markdown-0.16.3.wasm"
@WolfangAukang
WolfangAukang / README.md
Created January 2, 2024 15:51
Helix settings for CloudFormation YAML templates

Store it at .helix/languages.toml.

@WolfangAukang
WolfangAukang / flake.nix
Created August 9, 2023 18:16
Devshell flake importing a Python environment (based on https://github.com/numtide/devshell/issues/136)
{
description = "virtual environments";
inputs.devshell.url = "github:numtide/devshell";
inputs.flake-utils.url = "github:numtide/flake-utils";
outputs = { self, flake-utils, devshell, nixpkgs }:
flake-utils.lib.eachDefaultSystem (system: {
devShell =
let
@WolfangAukang
WolfangAukang / stack.yml
Last active May 6, 2023 15:32
arminc's Clair scan setup on docker-compose
version: '3.6'
services:
# Although the author recommends performing a link to reference this container as postgres,
# we could simply set the name as postgres. Also, link is a legacy flag.
postgres:
image: arminc/clair-db
clair:
image: arminc/clair-local-scan
@WolfangAukang
WolfangAukang / whitelist.yaml
Created May 6, 2023 14:17
clair-scanner Whitelist File Example
images:
simplerisk/simplerisk-minimal:
CVE-2019-19814: Debian kernel not solved yet
@WolfangAukang
WolfangAukang / flake.nix
Last active August 9, 2023 17:03
How to use Jupyter playbooks through Flakes (Nix)
{
description = "Jupyter playbook example";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
utils.url = "github:numtide/flake-utils";
};
outputs = { self, nixpkgs, utils }:
utils.lib.eachDefaultSystem (system:
@WolfangAukang
WolfangAukang / flake.nix
Last active October 5, 2022 13:06
How to use Dhall through Flakes (Nix)
{
description = "Dhall example";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
utils.url = "github:numtide/flake-utils";
};
outputs = { self, nixpkgs, utils }:
utils.lib.eachDefaultSystem (system:
@WolfangAukang
WolfangAukang / README.md
Created September 28, 2022 17:42
flake.nix for AWS SMTP script

This is a simple flake.nix for the SMTP key generator.

Steps: 1- Grab the Python script from here. Name it as main.py. 2- Set the secret key with SECRET_KEY=”insert_secret_key”. 3- Set the region with REGION=region-code-# (us-east-1, ca-central-1, etc…). 3- Run nix run .# -- $SECRET_KEY $REGION.

@WolfangAukang
WolfangAukang / binary-paths.patch
Last active May 9, 2022 15:56
Patch to enable test `protonvpn-nm-lib`. Currently, it fails because it needs to use DBus and can't be found in Nix sandbox. Credits to @NKJe for providing the patches at https://github.com/NixOS/nixpkgs/pull/129333
--- a/protonvpn_nm_lib/core/subprocess_wrapper.py
+++ b/protonvpn_nm_lib/core/subprocess_wrapper.py
@@ -44,11 +44,9 @@
binary_short_name => full secure path.
"""
# Look for root-owned directories in the system path in order
- for path in os.environ.get('PATH', '').split(os.path.pathsep):
+ for path in "@path@".split(os.path.pathsep):
if not os.path.isdir(path):
continue