Skip to content

Instantly share code, notes, and snippets.

@zcroll
zcroll / JetBrains products Activation code until december 13 2024
Last active May 5, 2024 14:21
JetBrains products Activation code until december 13 2024
I2A0QUY8VU-eyJsaWNlbnNlSWQiOiJJMkEwUVVZOFZVIiwibGljZW5zZWVOYW1lIjoiVU5JVkVSU0lEQURFIEVTVEFEVUFMIERFIENBTVBJTkFTIiwiYXNzaWduZWVOYW1lIjoiVGFvYmFv77yaSkVU5YWo5a625qG25r+AIOa0u+W3peS9nOWupCAgcmVuIHpodW4gZGlhbiBtaW5n77yBIiwiYXNzaWduZWVFbWFpbCI6IlJvYmJ5X1dlbmlnZXJAb3V0bG9vay5jb20iLCJsaWNlbnNlUmVzdHJpY3Rpb24iOiJGb3IgZWR1Y2F0aW9uYWwgdXNlIG9ubHkiLCJjaGVja0NvbmN1cnJlbnRVc2UiOmZhbHNlLCJwcm9kdWN0cyI6W3siY29kZSI6IkRQTiIsInBhaWRVcFRvIjoiMjAyNC0xMC0xNCIsImV4dGVuZGVkIjpmYWxzZX0seyJjb2RlIjoiREIiLCJwYWlkVXBUbyI6IjIwMjQtMTAtMTQiLCJleHRlbmRlZCI6ZmFsc2V9LHsiY29kZSI6IlBTIiwicGFpZFVwVG8iOiIyMDI0LTEwLTE0IiwiZXh0ZW5kZWQiOmZhbHNlfSx7ImNvZGUiOiJJSSIsInBhaWRVcFRvIjoiMjAyNC0xMC0xNCIsImV4dGVuZGVkIjpmYWxzZX0seyJjb2RlIjoiUlNDIiwicGFpZFVwVG8iOiIyMDI0LTEwLTE0IiwiZXh0ZW5kZWQiOnRydWV9LHsiY29kZSI6IkdPIiwicGFpZFVwVG8iOiIyMDI0LTEwLTE0IiwiZXh0ZW5kZWQiOmZhbHNlfSx7ImNvZGUiOiJETSIsInBhaWRVcFRvIjoiMjAyNC0xMC0xNCIsImV4dGVuZGVkIjpmYWxzZX0seyJjb2RlIjoiUlNGIiwicGFpZFVwVG8iOiIyMDI0LTEwLTE0IiwiZXh0ZW5kZWQiOnRydWV9LHsiY29kZSI6IkRTIiwicGFpZFVwVG8iOiIyMDI0LTEwL
#!/bin/bash
# Find ClusterIPs of Redis nodes
export REDIS_NODES=$(kubectl get pods -l app=redis-cluster -n redis -o json | jq -r '.items | map(.status.podIP) | join(":6379 ")'):6379
# Activate the Redis cluster
kubectl exec -it redis-cluster-0 -n redis -- redis-cli --cluster create --cluster-replicas 1 ${REDIS_NODES}
# Check if all went well
for x in $(seq 0 5); do echo "redis-cluster-$x"; kubectl exec redis-cluster-$x -n redis -- redis-cli role; echo; done
@wpmudev-sls
wpmudev-sls / forminator-control-duplicate-form.php
Created March 21, 2020 16:25
[Forminator] - Control duplicate form submission based on email/phone/ip
<?php
/**
* Plugin Name: [Forminator] - Control duplicate form submission based on email/phone/ip
* Description: [Forminator] - Control duplicate form submission based on email/phone/ip
* Task: 0/11289012348292/1167512707889228
* Author: Thobk @ WPMUDEV
* Author URI: https://premium.wpmudev.org
* License: GPLv2 or later
*/
if ( ! defined( 'ABSPATH' ) ) { exit; } elseif ( defined( 'WP_CLI' ) && WP_CLI ) { return; }
@wpmudev-sls
wpmudev-sls / wpmudev-forminator-duplicate-field-values.php
Last active May 5, 2024 14:19
[Forminator Pro] - Prevent duplicate entries. Allow to filter values and prevent duplicate entries for selected forms and fields
<?php
/**
* Plugin Name: [Forminator Pro] - Prevent duplicate entries
* Plugin URI: https://premium.wpmudev.org/
* Description: Allow to filter values and prevent duplicate entries for selected forms and fields (as of 1.8.1)
* Author: Alessandro Kaounas @ WPMUDEV
* Author URI: https://premium.wpmudev.org/
* License: GPLv2 or later
*/
@valiant-code
valiant-code / IronMon-Rules.md
Last active May 5, 2024 14:19
IronMon Rules

The IronMON Challenge

The IronMon challenge is a Pokémon Randomizer Challenge run created by Iateyourpie. Designed to make experiencing the randomizer fun and challenging, while taking away the wild Pokémon grind that come with some other challenges. It was originally made for Fire Red / Leaf Green but the rules can be applied/adjusted for other games as well. If you're interested to find out more about IronMon, join our Discord community!

IronMon has varying levels of difficulties, to keep it more approachable but also provide the toughest challenge possible for those who want it.

@develar
develar / commit-message-format.md
Created September 1, 2017 05:34
Commit Message Format

Commit Message Format

Each commit message consists of a header, a body and a footer. The header has a special format that includes a type, a scope and a subject:

<type>(<scope>): <subject>
<BLANK LINE>
<body>
<BLANK LINE>
@fatbobman
fatbobman / dynamicHeightSheet.swift
Created April 5, 2024 06:59
a dynamic sheet demo
import SwiftUI
struct ContentView: View {
@State var show = false
@State var height: CGFloat = 250
var body: some View {
List {
Button("Pop Sheet") {
height = 250
show.toggle()
@probonopd
probonopd / Send infrared commands from the Arduino to the iRobot Roomba
Created March 17, 2013 10:42
Send infrared commands from the Arduino to the iRobot Roomba. Use a transistor to drive the IR LED from pin D3 for maximal range.
#include <IRremote.h>
/*
Send infrared commands from the Arduino to the iRobot Roomba
by probono
2013-03-17 Initial release
@mjbalcueva
mjbalcueva / password-input.tsx
Last active May 5, 2024 14:13
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) => {
import os, sys, zlib, traceback
from Crypto.Cipher import AES
from struct import unpack as up
XORPAD = '3F99BB49B43CBBD339FE5FEA463316A8'.decode('hex')
KEY = 'CAECB4CA65678965CBE67D7A3AFD228C'.decode('hex')
IV = 'A65D5EA2D54AD0436DD46158C191361D'.decode('hex')
def safe_open(path, mode):
import os