Skip to content

Instantly share code, notes, and snippets.

Avatar

Emil Lerch elerch

View GitHub Profile
@elerch
elerch / packages.txt
Last active Oct 3, 2019
Standard Termux packages
View packages.txt
pkg install openssh # Because ssh
pkg install mosh # mosh is great for mobile
pkg install curl # Handy for package downloading - one of wget/curl is needed
pkg install wget # Handy for package downloading - one of wget/curl is needed
pkg install perl # Docs in mr need perl
pkg install git # Because git - also, needed for mr
pkg install zsh # Because zsh
pkg install neovim # Because neovim
pkg install ncurses-utils # Needed for tput command, needed by liquidprompt
pkg install gnupg # gpg-agent is here and will eliminate ssh-agent issues that seem to be inherent to termux env
@elerch
elerch / example-api-gateway.yaml
Last active Feb 28, 2020 — forked from tmaslen/Lambda-ApiGateway-Cloudformation.json
YAML version of tmaslen's API Gateway cloudformation template - useful when you don't want to use SAM
View example-api-gateway.yaml
---
AWSTemplateFormatVersion: '2010-09-09'
Description: Sample template that contains a Lambda function behind an API GW
Resources:
# BEGIN: Should only need this in an empty API Gateway situation
ApiGatewayCloudWatchLogsRole:
Type: AWS::IAM::Role
Properties:
AssumeRolePolicyDocument:
Version: '2012-10-17'
View linters.md

Want support for vim via Ale. See https://github.com/w0rp/ale

!! These linters check only files on disk. See :help ale-lint-file-linters

Chosen linters:

Language Tools
Bourne Shell/Bash shellcheck
@elerch
elerch / CJIS Policy diff.md
Last active Jul 31, 2017
CJIS policy diff procedure
View CJIS Policy diff.md
  1. Download the PDF and pass new and old versions through: http://pdftotext.com/

  2. Take each text file and run the following bash file on it to strip out the pagination, which can really muck with the diff. Call it with < file strip-pages major.minor > file-stripped

#!/bin/bash

version=${1}
footer=CJISD-ITS-DOC-08140-$version
View gist:688462db3077c504a95d3d0bd784d7ed
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKRF/xP6QW2On76if5qX+Hkj9jPDnToO2dEKQHacOOEh lobo@arch
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCoRxIS1Dr33Jhybd/ck7UCLQ1Df5msSpvw03w/ljgB+1sx/U+965+q597XRHHnzPey8NFrOdID4I1l0tfco1XG5DJG2yJ/zY+tbyK+0b0Yi4qbRFnH2kxKYcdHq29CiVk64o1VHJxxj78IO2wTUcgK4sXijm05LWqCik4LSfcOBEyOwK6f37Mew19KDq7UAojHLTEbVB6xiv2ufh9evn3PggirE1VtvQlTBnt3NdBDumxD1RzRoVgwMuU1FNvQeMwLnlMlvLX76vjPkRRrgBGEJ2k0BUm7slrAtRnBzIvIbouk55MIBzpPjCIi53L91KxwNkHNPldYG81C+BczN/R5 cardno:000604717732
@elerch
elerch / cloudformation-template-shell.yaml
Last active Oct 5, 2017
Useful shell for starting off a yaml CloudFormation template
View cloudformation-template-shell.yaml
AWSTemplateFormatVersion: '2010-09-09'
Parameters:
# Bucket:
# Type: String
# Default: emil
# Description: Bucket name holding source code for lambda functions
#Mappings:
#Conditions:
Resources:
MyResource:
@elerch
elerch / bootstrap.sh
Last active Sep 11, 2019
Bootstraps all the things (curl, git, mr, vcsh and dotfiles will exist after running)
View bootstrap.sh
#!/bin/sh
# To run this without copy/paste the whole thing:
# curl https://gist.githubusercontent.com/elerch/88ea951c9c4ec4c3c1604b8fc9167e53/raw/bootstrap.sh | sh
# mr is just a perl script
myrepos="http://source.myrepos.branchable.com/?p=source.git;a=blob_plain;f=mr;hb=HEAD"
# vcsh is just a bash script
vcsh=https://raw.githubusercontent.com/RichiH/vcsh/master/vcsh
View aws.plugin.zsh
_homebrew-installed() {
type brew &> /dev/null
}
_awscli-homebrew-installed() {
brew list awscli &> /dev/null
}
export AWS_HOME=~/.aws
View gist:74cc32ef31048778f10bb10110e59c42
# Dynamically load virtualenvwrapper functions to reduce shell startup
# time.
#
# Copyright 2012 Aron Griffis <aron@arongriffis.com>
# Released under the GNU GPL v3
#######################################################################
# Python virtualenvwrapper loads really slowly, so load it on demand.
if [[ $(type -t workon) != function ]]; then
virtualenv_funcs=( workon deactivate mkvirtualenv )
@elerch
elerch / sshconfig-stub
Created Jan 26, 2017
Stub for ~/.ssh/config
View sshconfig-stub
# Sane security defaults for SSH clients. Disables everything old and nasty.
# Explanation: http://mochtu.de/2015/01/06/securing-ssh-connections/
# Background information: https://stribika.github.io/2015/01/04/secure-secure-shell.html
# OSX Users: consider updating your openssh version, or you might see an error.
Host *
KexAlgorithms curve25519-sha256@libssh.org,diffie-hellman-group-exchange-sha256
# delete diffie-hellman-group-exchange-sha1
Ciphers chacha20-poly1305@openssh.com,aes256-ctr,aes192-ctr,aes128-ctr
MACs hmac-sha2-512-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-ripemd160-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-512,hmac-sha2-256,hmac-ripemd160,umac-128@openssh.com
You can’t perform that action at this time.