Skip to content

Instantly share code, notes, and snippets.

View beamop's full-sized avatar
:shipit:
~/dev/null

Marwâne beamop

:shipit:
~/dev/null
View GitHub Profile
@MBrassey
MBrassey / Match_Addresses.md
Last active April 11, 2024 12:44
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

@chriskempson
chriskempson / vs-code-strip-attributes-from-html-tags.txt
Last active October 25, 2023 00:27
VS Code - Strip Attributes from HTML Tags
# Couldn't figure out how to do /s or get VS Code to search over newlines so came up with this convoluted mess '[\S\s]*?\n?' that matches all characters plus newlines
Search for: <(table|tr|td|p|div|span)[\S\s]*?\n?>
Replace with: <$1>
@bradtraversy
bradtraversy / docker-help.md
Last active April 30, 2024 17:28
Docker Commands, Help & Tips

Docker Commands, Help & Tips

Show commands & management commands

$ docker

Docker version info

@CodingDoug
CodingDoug / README.md
Last active December 17, 2022 10:23
Copying data from Firebase Realtime Database to a Google Sheet in real time via Cloud Functions
@noygal
noygal / Windows Subsystem for Linux version 1 and 2 (WSL) - node install guide.md
Last active February 21, 2024 23:17
Installing node via windows subsystem for linux

Windows 10 version 2004 - Installing Node.js on Windows Subsystem for Linux (WSL/WSL2)

UPDATE (Fall 2020): This gist is an updated version to the Windows 10 Fall Creators Update - Installing Node.js on Windows Subsystem for Linux (WSL) guide, I usually just keep here notes, configuration or short guides for personal use, it was nice to know it also helps other ppl, I hope this one too.

Windows updated windows subsystem for linux to version 2, as the F.A.Q stated you can still use WSL version 1 side by side with version 2. I'm not sure about existing WSL machines surviving the upgrade process, but as always backup and 🤞. NOTE: WSL version 1 is not replace/deprecated, and there ar

@troyfontaine
troyfontaine / 1-setup.md
Last active May 3, 2024 10:52
Signing your Git Commits on MacOS

Methods of Signing Git Commits on MacOS

Last updated March 13, 2024

This Gist explains how to sign commits using gpg in a step-by-step fashion. Previously, krypt.co was heavily mentioned, but I've only recently learned they were acquired by Akamai and no longer update their previous free products. Those mentions have been removed.

Additionally, 1Password now supports signing Git commits with SSH keys and makes it pretty easy-plus you can easily configure Git Tower to use it for both signing and ssh.

For using a GUI-based GIT tool such as Tower or Github Desktop, follow the steps here for signing your commits with GPG.

@jhwheeler
jhwheeler / bigONotation.js
Last active February 21, 2024 18:36
Big O Notation Exercises
// 1. Even or odd
function isEven(value){
if (value % 2 == 0){
return true;
}
else
return false;
}
@heiswayi
heiswayi / repo-reset.md
Created February 5, 2017 01:32
GitHub - Delete commits history with git commands

First Method

Deleting the .git folder may cause problems in our git repository. If we want to delete all of our commits history, but keep the code in its current state, try this:

# Check out to a temporary branch:
git checkout --orphan TEMP_BRANCH

# Add all the files:
git add -A
@numberwhun
numberwhun / osi_model
Created November 16, 2016 00:04
osi_model
What is OSI model?
The OSI model (Open System Interconnection) model defines a computer networking framework to implement protocols in seven layers. A protocol in the networking terms is a kind of negotiation and rule in between two networking entities.
Layers of OSI model:
Physical layer
The Physical layer is also called as the Layer 1. Here are the basic functionalities of the Physical layer:
Responsible for electrical signals, light signal, radio signals etc.
Hardware layer of the OSI layer
@henriquemenezes
henriquemenezes / postgresql-set-id-seq.sql
Created March 31, 2016 12:23
PostgreSQL set Next ID Sequence Value to MAX(id) from Table
-- Get Max ID from table
SELECT MAX(id) FROM table;
-- Get Next ID from table
SELECT nextval('table_id_seq');
-- Set Next ID Value to MAX ID
SELECT setval('table_id_seq', (SELECT MAX(id) FROM table));