Skip to content

Instantly share code, notes, and snippets.

@martinsoender
martinsoender / setup.sh
Last active May 1, 2024 02:04
Vault, Nomad and Consul setup
dnf update -y
dnf install -y curl jq unzip
export CLUSTER_DC=fra1
export CLUSTER_PRIMARY_DC=fra1
export CLUSTER_PRIVATE_IPS=1.1.2.2,2.2.3.3,3.3.4.4
export CLUSTER_PUBLIC_IPS=1.1.1.1,2.2.2.2,3.3.3.3
export CLUSTER_SIZE=$(echo $CLUSTER_PUBLIC_IPS | jq -Rc 'split(",") | length')
export DOCKER_USERNAME=""
@mjbalcueva
mjbalcueva / password-input.tsx
Last active May 1, 2024 02:01
shadcn ui custom password input
"use client"
import { forwardRef, useState } from "react"
import { EyeIcon, EyeOffIcon } from "lucide-react"
import { Button } from "@/components/ui/button"
import { Input, InputProps } from "@/components/ui/input"
import { cn } from "@/lib/utils"
const PasswordInput = forwardRef<HTMLInputElement, InputProps>(
({ className, ...props }, ref) => {
@Clybius
Clybius / index.html
Last active May 1, 2024 01:59
Embed AV1/No File Size Capped Videos in Discord
<head>
<meta property="og:image" content="GifToEmbedURL"> # Change the content to the link of a gif of your choice, which will be shown as the embed.
<meta property="og:type" content="video.other">
<meta property="og:video:url" content="VideoToEmbedURL"> # Change the content to the link of a video of your choice. Will work with videos over 50 MB, and even unsupported codecs such as AV1!
<meta property="og:video:width" content="1920"> # Set this to the video's width and height, not required, but will show the video as intended if the aspect ratio and size is correct.
<meta property="og:video:height" content="1080">
</head>
library(tidyverse)
library(wakefield)
library(rdrobust)
library(rddensity)
library(broom)
library(huxtable)

# Make fake data
set.seed(1234)

VPN нужен любому человеку пользующимся интернетом в России. Другой вопрос - какой VPN всё ещё работает и как его достать? Благодаря людям и их ответам в VPN-треде, был составлен данный список.

Примечание: Возможно вам не требуется VPN для обхода блокировок, сначала посмотрите Дополнительные инструменты.

Легенда
⚠️ Ограниченный трафик
@CSTDev
CSTDev / auto-increment-version.sh
Last active May 1, 2024 01:57
Script that will find the last Git Tag and increment it. It will only increment when the latest commit does not already have a tag. By default it increments the patch number, you can tell it to change the major or minor versions by adding #major or #minor to the commit message.
#!/bin/bash
#get highest tag number
VERSION=`git describe --abbrev=0 --tags`
#replace . with space so can split into an array
VERSION_BITS=(${VERSION//./ })
#get number parts and increase last one by 1
VNUM1=${VERSION_BITS[0]}
@gabydd
gabydd / config.toml
Last active May 1, 2024 01:56
helix lf
[keys.normal]
C-f = [":new", ":insert-output lf-pick", "split_selection_on_newline", "goto_file", "goto_last_modification", "goto_last_modified_file", ":buffer-close!", ":theme nord", ":theme default"]
# replace the default after theme with the theme you use
# open 1 with the open command (l and <left> to open) or more with (<space> to select) then quit
# all opened files will be opened in helix

to workaround this log WARN when runing JDG clustered mode in a Mac box:

13:49:41,276 WARN  [org.jgroups.protocols.UDP] (TransferQueueBundler,shared=udp) JGRP000034: null: failure sending message to /234.99.54.14: java.io.IOException: Can't assign requested address (received 11 identical messages from /234.99.54.14 in the last 63239 ms)
# Adds a multicast route for 224.0.0.1-231.255.255.254
sudo route add -net 224.0.0.0/5 127.0.0.1
# Adds a multicast route for 232.0.0.1-239.255.255.254
@AadilGillani
AadilGillani / smali-cheatsheet.txt
Created October 1, 2021 06:49
Smalli Cheat-Sheet
A little help in Smali
(To be supplemented)
#
general information
#
Smali
Types
Dalvik bytecode has two main type classes, primitive types and reference types. Reference types are objects and arrays, everything else is primitive.