Skip to content

Instantly share code, notes, and snippets.

View rsrchboy's full-sized avatar

Chris Weyl rsrchboy

View GitHub Profile
  • SC1000 $ is not used specially and should therefore be escaped.
  • SC1001 This \o will be a regular 'o' in this context.
  • SC1003 Want to escape a single quote? echo 'This is how it'\''s done'.
  • SC1004 This backslash+linefeed is literal. Break outside single quotes if you just want to break the line.
  • SC1007 Remove space after = if trying to assign a value (or for empty string, use var='' ... ).
  • SC1008 This shebang was unrecognized. ShellCheck only supports sh/bash/dash/ksh. Add a 'shell' directive to specify.
  • SC1009 The mentioned parser error was in ...
  • SC1010 Use semicolo
" curl -fLo ~/.vim/autoload/plug.vim --create-dirs \
" https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
" Specify a directory for plugins
" - For Neovim: ~/.local/share/nvim/plugged
" - Avoid using standard Vim directory names like 'plugin'
call plug#begin('~/.vim/plugged')
Plug 'mhinz/vim-startify'
Plug 'tpope/vim-obsession'
@gabriel-v
gabriel-v / how_to_wireguard.sh
Last active February 4, 2024 22:20
Wireguard configuration for dummies
# install
firefox https://www.wireguard.com/install/
# for macOS use the brew/ports version, not the app
# be root
sudo -i
mkdir /etc/wireguard || true
cd /etc/wireguard
# create keys
@ageis
ageis / YubiKey-GPG-SSH-guide.md
Last active March 16, 2024 13:18
Technical guide for using YubiKey series 4 for GPG and SSH

YubiKey 4 series GPG and SSH setup guide

Written for fairly adept technical users, preferably of Debian GNU/Linux, not for absolute beginners.

You'll probably be working with a single smartcard, so you'll want only one primary key (1. Sign & Certify) and two associated subkeys (2. Encrypt, 3. Authenticate). I've published a Bash function which automates this slightly special key generation process.

@reachlin
reachlin / prometheus.yml
Created April 19, 2017 07:06
sample prometheus configuration explained
// For all the confusing Prometheus configuration and
// regular expressions,
// explained in examples.
// Remember, there are default values for each item if it's missing.
// regex is (.*),
// replacement is $1,
// separator is ;
// ,and action is replace
@gene1wood
gene1wood / aws_iam_managed_policies_2019-02-12.json
Last active May 19, 2020 02:08
Script to export all AWS IAM managed policies as well as the resulting list of all managed policies
[
{
"Document": {
"Statement": [
{
"Action": [
"directconnect:Describe*",
"ec2:DescribeVpnGateways"
],
"Effect": "Allow",
@katopz
katopz / gql_query_search_stargazers_fragment.gql
Created November 29, 2016 10:55
GraphQL Github Example : Search for top ten stargazers via query with fragment
// Try at : https://graphql-explorer.githubapp.com/
// With query variables below
// { "queryString": "language:JavaScript stars:>10000" }
query SearchMostTop10Star($queryString: String!) {
search(query: $queryString, type: REPOSITORY, first: 10) {
repositoryCount
edges {
node {
..._Repository
@pi0
pi0 / ConvoySetup.sh
Last active May 7, 2020 16:39
ConvoySetup
# Usage curl -#L https://git.io/convoy | sudo bash
CONVOY_VERSION=v0.5.0
cd /tmp
echo "Downloading convoy ..."
wget -q https://github.com/rancher/convoy/releases/download/$CONVOY_VERSION/convoy.tar.gz -O convoy.tar.gz
echo "Installing convoy ..."
@n-st
n-st / .bash_profile
Created May 29, 2016 12:04
Start zsh from bashrc. Useful when you can't use chsh or when the same LDAP account is used both on systems with zsh installed and ones without.
# .bash_profile is executed for login shells,
# .bashrc is executed for interactive non-login shells.
# We want the same behaviour for both, so we source .bashrc from .bash_profile.
# Also, when .bash_profile exists, bash ignores .profile, so we have to source
# it explicitly.
if [ -f "$HOME/.profile" ]; then
. "$HOME/.profile"
fi