Skip to content

Instantly share code, notes, and snippets.

@shyamsalimkumar
shyamsalimkumar / sstable-format-version-numbers.md
Last active March 14, 2023 21:59
Cassandra SSTable Format Version Numbers

Original Source

Finding all sstables not matching version “ib”

find /var/lib/cassandra/data/ -type f | grep -v -- -ib- | grep -v "/snapshots"

The version numbers, to date are:

Version 0

@yoavniran
yoavniran / ultimate-ut-cheat-sheet.md
Last active July 12, 2024 11:15
The Ultimate Unit Testing Cheat-sheet For Mocha, Chai, Sinon, and Jest
@6a6d74
6a6d74 / qudt-and-op-outline-for-wmo-codes-registry.md
Last active May 22, 2019 14:22
Outlining how to use QUDT and Observable Property ontologies in WMO Codes Registry
@9point6
9point6 / ssh-retry.sh
Last active April 22, 2023 08:44
Keep retrying SSH connection until success (Useful for waiting for VMs to boot)
#!/usr/bin/env bash
# Check we've got command line arguments
if [ -z "$*" ] ; then
echo "Need to specify ssh options"
exit 1
fi
# Start trying and retrying
((count = 100))
@grenade
grenade / 01-generate-ed25519-ssh-key.sh
Last active July 11, 2024 10:06
generate ed25519 ssh and gpg/pgp keys and set file permissions for ssh keys and config
#!/bin/bash
# generate new personal ed25519 ssh keys
ssh-keygen -o -a 100 -t ed25519 -f ~/.ssh/id_ed25519 -C "rob thijssen <rthijssen@gmail.com>"
ssh-keygen -o -a 100 -t ed25519 -f ~/.ssh/id_robtn -C "rob thijssen <rob@rob.tn>"
# generate new host cert authority (host_ca) ed25519 ssh key
# used for signing host keys and creating host certs
ssh-keygen -t ed25519 -f manta_host_ca -C manta.network
@harmy
harmy / vpn-setup.sh
Created October 15, 2012 07:19
Ubuntu VPN for poor Chinese (on AWS EC2)
#!/bin/bash -x
## original author: Oliver Nassar <onassar@gmail.com>
## credit: harmy <hack4cn@gmail.com>
## Ubuntu VPN for poor Chinese (you know de)
## Sample Usage:
##
## wget https://gist.github.com/raw/3891178/ff1702fac175eb21c513b93f51f39948be693aba/vpn-setup.sh
## chmod +x vpn-setup.sh
## sudo ./vpn-setup.sh <username> <password>
@asabaylus
asabaylus / gist:3071099
Created July 8, 2012 14:12
Github Markdown Heading Anchors

Anchors in Markdown

To create an anchor to a heading in github flavored markdown. Add - characters between each word in the heading and wrap the value in parens (#some-markdown-heading) so your link should look like so:

[create an anchor](#anchors-in-markdown)

@andreyvit
andreyvit / tmux.md
Created June 13, 2012 03:41
tmux cheatsheet

tmux cheat sheet

(C-x means ctrl+x, M-x means alt+x)

Prefix key

The default prefix is C-b. If you (or your muscle memory) prefer C-a, you need to add this to ~/.tmux.conf:

remap prefix to Control + a