Skip to content

Instantly share code, notes, and snippets.

View mllnd's full-sized avatar

Markkus Millend mllnd

View GitHub Profile
@mobilemind
mobilemind / git-tag-delete-local-and-remote.sh
Last active April 22, 2025 20:08
how to delete a git tag locally and remote
# delete local tag '12345'
git tag -d 12345
# delete remote tag '12345' (eg, GitHub version too)
git push origin :refs/tags/12345
# alternative approach
git push --delete origin tagName
git tag -d tagName
@jo
jo / js-crypto-libraries.md
Last active May 4, 2025 22:08
List of JavaScript Crypto libraries.

JavaScript Crypto Libraries

List some crypto libraries for JavaScript out there. Might be a bit out dated. Scroll to the bottom.

WebCryptoAPI

http://www.w3.org/TR/WebCryptoAPI/

This specification describes a JavaScript API for performing basic cryptographic operations in web applications, such as hashing, signature generation and verification, and encryption and decryption. Additionally, it describes an API for applications to generate and/or manage the keying material necessary to perform these operations. Uses for this API range from user or service authentication, document or code signing, and the confidentiality and integrity of communications.

@jj1bdx
jj1bdx / update-python-homebrew.md
Last active February 23, 2019 16:23
Updating python, pip, setuptools/easy_install on OS X with HomeBrew

Updating Python on OS X with HomeBrew

Updating Python library with HomeBrew could be a painful experience. Upgrading setuptools and pip may cause version disruption and will render pip and easy_install useless.

Here's a list of commands for the install process, FYI.

# disable virtualenv before doing this
@ainsofs
ainsofs / gist:2b80771a5582b7528d9e
Created April 16, 2015 01:50
Clear .gitignore cache
# remove specific file from git cache
git rm --cached filename
# remove all files from git cache
git rm -r --cached .
git add .
git commit -m ".gitignore is now working"
@parmentf
parmentf / GitCommitEmoji.md
Last active May 12, 2025 06:48
Git Commit message Emoji
@maugelves
maugelves / polylang.php
Last active June 11, 2021 05:56
This functions returns a WordPress page permalink for the current language by its slug.
<?php
/**
* This function returns a page permalink
* for the current website language.
*
* @author Mauricio Gelves <[email protected]>
* @param $page_slug string WordPress page slug
* @return string|false Page Permalink or false if the page is not found
*/
@ixdy
ixdy / yubikey4-ssh-macos.md
Last active February 9, 2025 12:12
Setting up ssh public key authentication on macOS using a YubiKey 4

Setting up ssh public key authentication on macOS using a YubiKey 4

I largely followed Florin's blog post, but have a few notes to add regarding issues I encountered:

Basic setup notes

  1. I used a YubiKey 4, while the blog describes using a YubiKey NEO. I'm sure a YubiKey 5 would also work. I'm also running macOS 10.13.6.
  2. I installed GPGTools as recommended. However, as I'll note later, it seems that gpg-agent only automatically starts when gpg is used; for ssh, you'll need to ensure it's running.
  3. Before generating your keys, decide what key size you want to use. If you run the list command inside gpg --edit-card, look for the Key attributes line to see what is currently selected. On my YubiKey 4, it defaulted to 2048 bits for all keys:
Key attributes ...: rsa2048 rsa2048 rsa2048
@mikroskeem
mikroskeem / mattermost-oauth.md
Created March 16, 2019 22:54
Mattermost OAuth 2.0 endpoints

Mattermost OAuth2.0 endpoints

{mattermost_url} = your Mattermost instance url

  • https://{mattermost_url}/oauth/authorize # auth_url
  • https://{mattermost_url}/oauth/access_token # token_url
  • https://{mattermost_url}/api/v4/users/me # so-called api_url

Notes

@usmansaleem
usmansaleem / DecryptKeystore.java
Last active July 18, 2023 11:17
Decrypt EIP-2335 Keystore. Place it in web3signer installation and invoke it as `java -cp "lib/*" ./DecryptKeystore.java ./scryptTestVector.json`
/*
* Copyright 2020 ConsenSys AG.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
* an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
@yorickdowne
yorickdowne / GethBEHAVE.md
Last active January 17, 2025 17:36
Pruning Geth 1.10.x, 1.11.x, 1.12.x

Note: PBSS in Geth >=1.13.0 removes the need to prune manually.


Old content for reference

Overview

Geth (Go-Ethereum) as of July 2022 takes about 650 GiB of space on a fast/snap sync, and then grows by ~ 14 GiB/week with default cache, ~ 8 GiB/week with more cache.