Skip to content

Instantly share code, notes, and snippets.

View Dentrax's full-sized avatar
🎶
GNW's Not Wololooo!

Furkan Türkal Dentrax

🎶
GNW's Not Wololooo!
View GitHub Profile

Container Images

Kubernetes

Verify single image

$ cosign verify registry.k8s.io/kube-apiserver-amd64:v1.25.2

Get the download URLs for the latest version of all Wolfi packages

https://github.com/jonjohnsonjr/apkrane

$ apkrane ls https://packages.wolfi.dev/os/x86_64/APKINDEX.tar.gz --latest --full
@agnostic-apollo
agnostic-apollo / Android-Phantom,Cached-And-Empty-Processes.md
Last active November 10, 2024 00:51
Android Phantom, Cached And Empty Processes
@xrl
xrl / lease.rs
Created July 30, 2021 20:58
Using rust kube-rs to check, poll, and renew advisory locks in Kubernetes
use k8s_openapi::api::coordination::v1::{Lease as KubeLease, LeaseSpec as KubeLeaseSpec};
use chrono::{Local, Utc};
use k8s_openapi::apimachinery::pkg::apis::meta::v1::MicroTime;
use std::time::Duration;
use kube::api::{PatchParams, PostParams, ObjectMeta};
use kube::Api;
use tokio::task::JoinHandle;
use tokio::sync::oneshot::Sender;
const LEASE_DURATION_SECONDS: u64 = 5;
@smartameer
smartameer / prepare-commit-msg
Created July 6, 2021 19:35
Git coauthor hook for pre-commit message
#!/bin/bash
function prompt_for_multiselect {
# little helpers for terminal print control and key input
GREEN='\033[00;32m'
YELLOW='\033[00;33m'
RESTORE='\033[0m'
ESC=$( printf "\033")
cursor_blink_on() { printf "$ESC[?25h"; }
@Linch1
Linch1 / tokenPriceApi.js
Last active November 3, 2024 21:17
Retrive the price of any bsc token from it's address without using external service like poocoin/dextools
let pancakeSwapAbi = [
{"inputs":[{"internalType":"uint256","name":"amountIn","type":"uint256"},{"internalType":"address[]","name":"path","type":"address[]"}],"name":"getAmountsOut","outputs":[{"internalType":"uint256[]","name":"amounts","type":"uint256[]"}],"stateMutability":"view","type":"function"},
];
let tokenAbi = [
{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},
];
const Web3 = require('web3');
/*
Required Node.js
FROM alpine:3.12
RUN apk add --no-cache curl jq bash
CMD ["/bin/sh"]
@Igelchen1
Igelchen1 / main.rego
Created June 21, 2020 19:51
k8s-content-trust-main
package policy.mutating
import data.k8s.matches
main = {
"apiVersion": "admission.k8s.io/v1",
"kind": "AdmissionReview",
"response": response,
}
#define _GNU_SOURCE
#include <errno.h>
#include <sched.h>
#include <signal.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/mount.h>
#include <sys/stat.h>
#include <sys/syscall.h>
#include <sys/types.h>
@lisawolderiksen
lisawolderiksen / git-commit-template.md
Last active November 11, 2024 09:31
Use a Git commit message template to write better commit messages

Using Git Commit Message Templates to Write Better Commit Messages

The always enthusiastic and knowledgeable mr. @jasaltvik shared with our team an article on writing (good) Git commit messages: How to Write a Git Commit Message. This excellent article explains why good Git commit messages are important, and explains what constitutes a good commit message. I wholeheartedly agree with what @cbeams writes in his article. (Have you read it yet? If not, go read it now. I'll wait.) It's sensible stuff. So I decided to start following the

@magicdude4eva
magicdude4eva / zsh-syntax-highlighting paste performance improvement
Last active September 4, 2024 03:41
zsh-syntax-highlighting paste performance improvement
Add the following in .zshrc:
...
plugins=(osx git zsh-autosuggestions zsh-syntax-highlighting zsh-nvm docker kubectl)
...
### Fix slowness of pastes with zsh-syntax-highlighting.zsh
pasteinit() {
OLD_SELF_INSERT=${${(s.:.)widgets[self-insert]}[2,3]}
zle -N self-insert url-quote-magic # I wonder if you'd need `.url-quote-magic`?