Skip to content

Instantly share code, notes, and snippets.

@MBrassey
MBrassey / Match_Addresses.md
Last active May 8, 2024 05:52
Match Crypto Wallet Addresses (REGEX)

Match Crypto Wallet Addresses using Regular Expressions

The following regular expressions are crafted to match some commonly used cryptocurrency wallet address types. This document details the Regex components and pattern tests to match Ethereum, Bitcoin, Dash and Monero addresses.

🌀 Click the images below to view the tested patterns.

Ethereum (ETH)

/^0x[a-fA-F0-9]{40}$/g

@royshil
royshil / SimpleVideoStabilizer.cpp
Last active May 8, 2024 05:49
A simple video stabilizer in OpenCV, based on goodFeaturesToTrack, calcOpticalFlowPyrLK and estimateRigidTransform.
#include <opencv2/core/core.hpp>
#include <opencv2/highgui/highgui.hpp>
#include <opencv2/features2d/features2d.hpp>
#include <opencv2/imgproc/imgproc.hpp>
#include <opencv2/video/video.hpp>
#include <iostream>
using namespace cv;
using namespace std;
@steven2358
steven2358 / ffmpeg.md
Last active May 8, 2024 05:51
FFmpeg cheat sheet
@hftf
hftf / check-underline.js
Last active May 8, 2024 05:38
Node_modules monkeypatches for google-docs-to-markdown
# Patch 1 of 4. Create node_modules/mdast-util-to-markdown/lib/util/check-underline.js
/**
* @typedef {import('../types.js').Options} Options
* @typedef {import('../types.js').State} State
*/
/**
* @param {State} state
* @returns {Exclude<Options['underline'], null | undefined>}
@alexanderlerch
alexanderlerch / data-sets.md
Last active May 8, 2024 05:33
list of MIR datasets
dataset meta data contents with audio
200DrumMachines 7371 one-shots yes
AAM onsets, pitches, instruments, melody instrument, keys, chords, tempo, beats 3000 (artificial) tracks yes
ACM_MIRUM tempo 1410 excerpts (60s) yes
ACPAS aligned audio and scores 2189 performances of 497 scores downloadable
AcousticBrainz-Genre 15-31 genres with 265-745 subgenres audio features for over 2000000 songs no
# start GremlinServer
# bin/gremlin-server.sh -i org.apache.tinkerpop gremlin-python 3.2.2-SNAPSHOT
# bin/gremlin-server.sh conf/gremlin-server-modern-py.yaml
from gremlin_python.process.graph_traversal import GraphTraversal
from gremlin_python.process.graph_traversal import GraphTraversalSource
from gremlin_python.process.graph_traversal import __
from gremlin_python.process.traversal import Operator
from gremlin_python.structure.io.graphson import GraphSONReader
@aKamrani
aKamrani / Extend LVM partition in ubuntu server
Created May 6, 2024 09:35
Extend LVM partition in ubuntu server.
Extend lvm partition in ubuntu server.
my lv group name is ubuntu-vg
my lv name is ubuntu-lv
my lv path is /
Verify Free Space: First, ensure that you have available free space on your physical volume (disk) or a new disk that you can add to your volume group. You can check the available space by running the command:
``` sudo vgdisplay ubuntu-vg ```
Create a New Partition: If you have added a new disk, you need to create a new partition on it. Use the appropriate partitioning tool (e.g., fdisk, parted, etc.) to create a new partition. Make sure the partition type is set to "8e" (Linux LVM).
@scy
scy / opening-and-closing-an-ssh-tunnel-in-a-shell-script-the-smart-way.md
Last active May 8, 2024 05:28
Opening and closing an SSH tunnel in a shell script the smart way

Opening and closing an SSH tunnel in a shell script the smart way

I recently had the following problem:

  • From an unattended shell script (called by Jenkins), run a command-line tool that accesses the MySQL database on another host.
  • That tool doesn't know that the database is on another host, plus the MySQL port on that host is firewalled and not accessible from other machines.

We didn't want to open the MySQL port to the network, but it's possible to SSH from the Jenkins machine to the MySQL machine. So, basically you would do something like

ssh -L 3306:localhost:3306 remotehost

@Siddhant-K-code
Siddhant-K-code / til-8-may-2024.md
Created May 8, 2024 04:34
TIL (05/08/2024): DynamoDB Query Evaluation Order Differs from SQL

DynamoDB Query Evaluation Order Differs from SQL

Summary:

When using LIMIT in DynamoDB queries, the order of evaluation can differ from SQL queries, potentially leading to unexpected results depending on the search criteria used.

SQL Query Evaluation Order:

SQL queries follow a specific order of evaluation:

FROM -&gt; ON -&gt; JOIN -&gt; WHERE -&gt; GROUP BY -&gt; HAVING -&gt; SELECT -&gt; DISTINCT -&gt; ORDER BY -&gt; LIMIT
@tomasevich
tomasevich / remove-all-from-docker.md
Last active May 8, 2024 05:19 — forked from beeman/remove-all-from-docker.sh
Удалить/очистить все данные Докера (контейнеры, образы, тома и сети)

Удалить/очистить все данные Докера (контейнеры, образы, тома и сети)

Одной строкой

docker stop $(docker ps -qa) && docker rm $(docker ps -qa) && docker rmi -f $(docker images -qa) && docker volume rm $(docker volume ls -q) && docker network rm $(docker network ls -q)

Описание команд