Skip to content

Instantly share code, notes, and snippets.

@maxwellmlin
maxwellmlin / LPX-Trial-Reset.sh
Created April 14, 2021 03:46
Logic Pro X Trial Reset
mv -v ~/Library/Application\ Support/.lpxuserdata ~/.Trash
@db0sch
db0sch / regenerate_credentials.md
Last active October 31, 2023 20:30
How to regenerate the master key for Rails 5.2 credentials

If your master.key has been compromised, you might want to regenerate it.

No key regeneration feature at the moment. We have to do it manually.

  1. Copy content of original credentials rails credentials:show somewhere temporarily.
  2. Remove config/master.key and config/credentials.yml.enc
  3. Run EDITOR=vim rails credentials:edit in the terminal: This command will create a new master.key and credentials.yml.enc if they do not exist.
  4. Paste the original credentials you copied (step 1) in the new credentials file (and save + quit vim)
  5. Add and Commit the file config/credentials.yml.enc
@F21
F21 / signing-gpg-keys.md
Last active April 17, 2024 14:37
Signing someone's GPG key

This is a quick guide of the commands we use to sign someone's GPG key in a virtual key signing party.

Note: The steps cover only the technical aspects of signing someone's key. Before signing someone's key, you must verify their identity. This is usually done by showing government-issued ID and confirming the key's fingerprint

The commands will work for both GPG and GPG2.

I use Julian's key for the examples. His key id is 2AD3FAE3. You should substitute with the appropriate key id when running the commands.

Signing the key

  1. List the keys currently in your keyring: gpg --list-keys.
@oliveratgithub
oliveratgithub / emojis.json
Last active April 19, 2024 05:47
Emoji-list with emojis, names, shortcodes, unicode and html entities [massive list]
{
"emojis": [
{"emoji": "👩‍👩‍👧‍👧", "name": "family: woman, woman, girl, girl", "shortname": ":woman_woman_girl_girl:", "unicode": "1F469 200D 1F469 200D 1F467 200D 1F467", "html": "👩‍👩‍👧‍👧", "category": "People & Body (family)", "order": ""},
{"emoji": "👩‍👩‍👧‍👦", "name": "family: woman, woman, girl, boy", "shortname": ":woman_woman_girl_boy:", "unicode": "1F469 200D 1F469 200D 1F467 200D 1F466", "html": "👩‍👩‍👧‍👦", "category": "People & Body (family)", "order": ""},
{"emoji": "👩‍👩‍👦‍👦", "name": "family: woman, woman, boy, boy", "shortname": ":woman_woman_boy_boy:", "unicode": "1F469 200D 1F469 200D 1F466 200D 1F466", "html": "👩‍👩‍👦‍👦", "category": "People & Body (family)", "order": ""},
{"emoji": "👨‍👩‍👧‍👧", "name": "family: man, woman, girl, girl", "shortname": ":man_woman_girl_girl:", "unicode": "1F468 200D 1F469 200D 1F467 200D 1F467", "html": "👨‍👩&z
@shurup14
shurup14 / mimes.json
Last active March 19, 2020 21:10
Mimes types
{
"text/vnd.wap.wmlscript": "Wireless Markup Language Script (WMLScript)",
"application/cu-seeme": "CU-SeeMe",
"application/vnd.mobius.plc": "Mobius Management Systems - Policy Definition Language File",
"application/vnd.dna": "New Moon Liftoff/DNA",
"application/mathml+xml": "Mathematical Markup Language",
"image/x-cmx": "Corel Metafile Exchange (CMX)",
"application/vnd.oasis.opendocument.text": "OpenDocument Text",
"application/vnd.ezpix-album": "EZPix Secure Photo Album",
"application/xslt+xml": "XML Transformations",
@johnfoderaro
johnfoderaro / httpd.conf
Created December 24, 2016 15:09
Default httpd.conf file - macOS Sierra 10.12.2 - /etc/apache2/httpd.conf
#
# This is the main Apache HTTP server configuration file. It contains the
# configuration directives that give the server its instructions.
# See <URL:http://httpd.apache.org/docs/2.4/> for detailed information.
# In particular, see
# <URL:http://httpd.apache.org/docs/2.4/mod/directives.html>
# for a discussion of each configuration directive.
#
# Do NOT simply read the instructions in here without understanding
# what they do. They're here only as hints or reminders. If you are unsure
@equivalent
equivalent / gist:b492f6779e99ee9defb2
Created March 23, 2016 23:54
Ruby AES Encryption using OpenSSL
#!/usr/bin/env ruby
require "openssl"
require 'digest/sha2'
require 'base64'
# We use the AES 256 bit cipher-block chaining symetric encryption
alg = "AES-256-CBC"
# We want a 256 bit key symetric key based on some passphrase
digest = Digest::SHA256.new
@leonklingele
leonklingele / client.sh
Last active July 19, 2023 20:35
netcat – encrypt transfer with openssl
IP="127.0.0.1"
PORT="8877"
SHARED_SECRET="shared secret"
OPENSSL="/usr/local/opt/libressl/bin/openssl"
OPENSSL_CMD="$OPENSSL enc -a -A -aes-256-gcm"
while IFS= read -r MSG; do
echo "$MSG" | $OPENSSL_CMD -e -k "$SHARED_SECRET"
echo
@u0d7i
u0d7i / disable_vim_auto_visual_on_mouse.txt
Last active February 27, 2024 14:08
Disable vim automatic visual mode on mouse select
Disable vim automatic visual mode on mouse select
issue: :set mouse-=a
add to ~/.vimrc: set mouse-=a
my ~/.vimrc for preserving global defaults and only changing one option:
source $VIMRUNTIME/defaults.vim
set mouse-=a
@paulirish
paulirish / bling.js
Last active April 20, 2024 17:39
bling dot js
/* bling.js */
window.$ = document.querySelectorAll.bind(document);
Node.prototype.on = window.on = function (name, fn) {
this.addEventListener(name, fn);
}
NodeList.prototype.__proto__ = Array.prototype;