Skip to content

Instantly share code, notes, and snippets.

@reinvanoyen
reinvanoyen / terminal-prompt-git-branch-zsh.md
Last active May 10, 2024 04:54
Add Git Branch Name to Terminal Prompt (MacOS zsh)

Add Git Branch Name to Terminal Prompt (zsh)

Updated for MacOS with zsh

  • Catalina
  • Big Sur
  • Monterey
  • Ventura
  • Sonoma

screenshot

@Dziurwa14
Dziurwa14 / codes.md
Last active May 10, 2024 04:52
Discord error codes

Error Codes

All collected Discord error codes, categorized by type (first 2 digits).

Miscellaneous

Code Message
0 General error (such as a malformed request body, amongst other things)

Unknown API object

@azagniotov
azagniotov / beautiful.rest.api.docs.in.markdown.md
Last active May 10, 2024 04:52
Example to create beautiful REST API docs in Markdown, inspired by Swagger API docs.
@troyhunt
troyhunt / Eye4Fraud-SiteName-Values.csv
Last active May 10, 2024 04:51
Eye4Fraud SiteName values
Lovelyskin 3338541
Jomashop Magento 2342771
iTechDeals 1411036
tilebar.com 910699
AppliancesConnection 663130
CANADIANAPPLIANCE.CA 645213
MoodFabrics 585985
Botach.com 488274
BeachCamera 483356
ezcontactsusa 464685
@policante
policante / BaseNavigationController.swift
Created February 20, 2019 20:40
UINavigationController swipe back like Facebook, Instagram
class BaseNavigationController: UINavigationController, UINavigationControllerDelegate {
var interactivePopTransition: UIPercentDrivenInteractiveTransition!
override func viewDidLoad() {
self.delegate = self
}
func navigationController(_ navigationController: UINavigationController, willShow viewController: UIViewController, animated: Bool) {
addPanGesture(viewController)
@saiyam1814
saiyam1814 / k8s1.30.sh
Created April 22, 2024 13:56
k8s1.30.sh
echo "step1- install kubectl,kubeadm and kubelet 1.29.0"
sudo mkdir -m 755 /etc/apt/keyrings
sudo apt-get install -y apt-transport-https ca-certificates curl gpg
curl -fsSL https://pkgs.k8s.io/core:/stable:/v1.30/deb/Release.key | sudo gpg --dearmor -o /etc/apt/keyrings/kubernetes-apt-keyring.gpg
echo 'deb [signed-by=/etc/apt/keyrings/kubernetes-apt-keyring.gpg] https://pkgs.k8s.io/core:/stable:/v1.30/deb/ /' | sudo tee /etc/apt/sources.list.d/kubernetes.list
sudo apt update -y
sudo apt -y install vim git curl wget kubelet kubeadm kubectl
@StepTurtle
StepTurtle / lio_sam_with_object_removal.md
Last active May 10, 2024 04:52
Create LIO-SAM map with object removal
@egtann
egtann / example.templ
Last active May 10, 2024 04:44
Using a strict CSP with HTMX and Templ
// Example component with styling and script tags. The script+style will work even when
// retrieved after page load via HTMX because of our X-Nonce header/middleware.
templ MyComponent() {
<style nonce={ nonceFrom(ctx) }>
.red {
color: red;
}
</style>
<script nonce={ nonceFrom(ctx) }>
/*
Do not modify this version of the file. It will be copied over when any of the project's targets are built.
If you wish to modify mraid.js, modify the version located at mopub-sdk-common/mraid/mraid.js.
*/
(function() {
var isIOS = (/iphone|ipad|ipod/i).test(window.navigator.userAgent.toLowerCase());
if (isIOS) {
console = {};
console.log = function(log) {
var iframe = document.createElement('iframe');
@mattatz
mattatz / Matrix.hlsl
Last active May 10, 2024 04:39
Matrix operations for HLSL
#ifndef __MATRIX_INCLUDED__
#define __MATRIX_INCLUDED__
#define IDENTITY_MATRIX float4x4(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1)
float4x4 inverse(float4x4 m) {
float n11 = m[0][0], n12 = m[1][0], n13 = m[2][0], n14 = m[3][0];
float n21 = m[0][1], n22 = m[1][1], n23 = m[2][1], n24 = m[3][1];
float n31 = m[0][2], n32 = m[1][2], n33 = m[2][2], n34 = m[3][2];
float n41 = m[0][3], n42 = m[1][3], n43 = m[2][3], n44 = m[3][3];