Skip to content

Instantly share code, notes, and snippets.

Avatar
🎯
Making an impact

Mark McDonnell Integralist

🎯
Making an impact
View GitHub Profile
@Integralist
Integralist / Google Doc Code Syntax.md
Last active Nov 20, 2020
[Google Doc Code Syntax] #google #doc #code #syntax #brew #highlight
View Google Doc Code Syntax.md
brew install highlight

Now copy some code to your clipboard, followed by running:

pbpaste | highlight --syntax=go -O rtf | pbcopy
@Integralist
Integralist / Populate (or update) pkg.go.dev with new package.md
Created Nov 18, 2020
[Populate (or update) pkg.go.dev with new package] #go #golang #dev #pkg
View Populate (or update) pkg.go.dev with new package.md

If you want a project to appear in https://pkg.go.dev then visit the expected page and click on the "Request ..." button.

e.g.

https://pkg.go.dev/github.com/integralist/go-flags

I clicked on the button "Request github.com/integralist/go-flags" and it started to populate.

@Integralist
Integralist / Security Types - Encryption, Hashing, Signatures.md
Created Nov 12, 2020
[Security Types - Encryption, Hashing, Signatures] #security #sec #encryption #hash #signatures #hmac
View Security Types - Encryption, Hashing, Signatures.md
  • Encryption helps ensure confidentiality.
  • Hashing can help ensure integrity.
  • Digital signatures or message authentication codes (MAC, including keyed hashing such as HMAC) can be used to verify authenticity.
@Integralist
Integralist / Ruby RVM.bash
Last active Nov 11, 2020
[Ruby RVM] #ruby #rvm
View Ruby RVM.bash
# install rvm
#
curl -sSL https://get.rvm.io | bash
# lookup available ruby interpreters
#
rvm list known
# install specific ruby version
#
@Integralist
Integralist / CLI terminology flags vs arguments vs options.md
Created Nov 11, 2020
[CLI terminology flags vs arguments vs options] #cli #terminology #flags #arguments #args #options
View CLI terminology flags vs arguments vs options.md

Example binary execution:

<command> <flags|options> <arguments>

Note: 'options' was historically used to suggest the input as being 'optional' and so it typically maps to .

@Integralist
Integralist / Github GPG Commit Signing Key.md
Last active Nov 18, 2020
[Github GPG Commit Signing Key] #gpg #github #commit #sign #key
View Github GPG Commit Signing Key.md
gpg --full-generate-key
git config --global --edit
[user]
@Integralist
Integralist / 1. Guessing Game.rs
Created Nov 2, 2020
[Rust Book Examples] #rust #rustlang
View 1. Guessing Game.rs
use rand::Rng;
use std::cmp::Ordering;
use std::io;
fn main() {
let secret_number = rand::thread_rng().gen_range(1, 101);
println!("secret number: {}", secret_number);
loop {
@Integralist
Integralist / Export GPG Private Key.bash
Created Oct 27, 2020
[Export GPG Private Key] #gpg #private #key #export #backup
View Export GPG Private Key.bash
# explains how to export a private key for 'back-up' purposes
#
gpg --export-secret-keys > /Volumes/<usb>/Key/<identify>
gpg --export-secret-keys --armor > /Volumes/<usb>/Key/<identify>.asc
# if you're not comfortable with the security of your chose passphrase
# then consider making a paper backup which can be stored in a fireproof safe
# https://www.jabberwocky.com/software/paperkey/
#
@Integralist
Integralist / Laptop Configuration. Summary.md
Last active Oct 27, 2020
[Laptop Configuration: Summary] #new #laptop #configuration #macos
View Laptop Configuration. Summary.md
  • Settings
    • Dock (Automatically hide and show the Dock)
    • Keyboard (Key Repeat = Fast, Delay Until Repeat = Short)
    • Accessibility > Zoom (Use keyboard shortcuts to zoom)
    • Date & Time > Clock (Show date + Display the time with seconds)
    • Mission Control (disable "Automatically rearrange Spaces based on most recent use")
  • https://www.expressvpn.com/setup#mac
  • https://www.mozilla.org/en-GB/firefox/new/
    • Preferences
      • General > Startup (Restore previous session + Warn you when quitting the browser)
@Integralist
Integralist / CRDT. conflict-free replicated data type.md
Created Oct 2, 2020
[CRDT: conflict-free replicated data type] #crdt #distributed
View CRDT. conflict-free replicated data type.md

Operations on CRDTs need to adhere to the following rules:

  • Associativity (a+(b+c)=(a+b)+c), so that grouping doesn't matter.
  • Commutativity (a+b=b+a), so that order of application doesn't matter.
  • Idempotence (a+a=a), so that duplication doesn't matter.

Data types as well as operations have to be specifically crafted to meet these rules. CRDTs have known implementations for counters, registers, sets, graphs, and others.

You can’t perform that action at this time.