Skip to content

Instantly share code, notes, and snippets.

View anthonyclarka2's full-sized avatar

Anthony Clark anthonyclarka2

  • Nexient
  • Ann Arbor, MI
View GitHub Profile

Keybase proof

I hereby claim:

  • I am anthonyclarka2 on github.
  • I am anthonyclarka2 (https://keybase.io/anthonyclarka2) on keybase.
  • I have a public key ASAk4XwYIOY8dzUKXPCH6JyN1lsw8R1TpivP3UmwH_tqowo

To claim this, I am signing this object:

@anthonyclarka2
anthonyclarka2 / attributes.rb
Created April 20, 2019 15:33 — forked from lizthegrey/attributes.rb
Hardening SSH with 2fa
default['sshd']['sshd_config']['AuthenticationMethods'] = 'publickey,keyboard-interactive:pam'
default['sshd']['sshd_config']['ChallengeResponseAuthentication'] = 'yes'
default['sshd']['sshd_config']['PasswordAuthentication'] = 'no'
# Basic .zshrc for use on WSL (Windows Subsystem for Linux)
# https://github.com/robbyrussell/oh-my-zsh/wiki/Cheatsheet
export ZSH="/home/aclark/.oh-my-zsh"
# Outputs: "fedora :: ~ »"
ZSH_THEME="afowler"
# Check once a month for oh-my-zsh updates
export UPDATE_ZSH_DAYS=28
ilikepi 1 hour ago | unvote [-]
It's not to hard to extract the app bundle from the .pkg file. This is how I've always installed it. Do this from an empty directory, though, since it will just spray files everywhere...
* Use `xar` to extract the contents of the .pkg file:
$ xar -xf Zoom.pkg
* Use `cpio` to extract the payload, which is in a file oddly named "Scripts":
@anthonyclarka2
anthonyclarka2 / swap_check.sh
Created September 5, 2019 17:51 — forked from goiko74/swap_check.sh
display swap usage per PID (no sudo)
#!/bin/bash
# Get current swap usage for all running processes
# Erik Ljungstrom 27/05/2011
# Modified by Mikko Rantalainen 2012-08-09
# Pipe the output to "sort -nk3" to get sorted output
# Modified by Marc Methot 2014-09-18
# removed the need for sudo
SUM=0
OVERALL=0
@anthonyclarka2
anthonyclarka2 / afowler-nohost-root.zsh-theme
Created September 9, 2019 16:23
a simple modification of the oh-my-zsh theme "afowler" without the hostname included, and adding ROOT in red letters when $uid=0
if [ $UID -eq 0 ]; then CARETCOLOR="red"; else CARETCOLOR="blue"; fi
local return_code="%(?..%{$fg[red]%}%? ↵%{$reset_color%})"
PROMPT='%{${fg_bold[$CARETCOLOR]}%}ROOT%{${reset_color}%} %{${fg_bold[blue]}%}:: %{$reset_color%}%{${fg[green]}%}%3~ $(git_prompt_info)%{${fg_bold[$CARETCOLOR]}%}»%{${reset_color}%} '
RPS1="${return_code}"
ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg[yellow]%}‹"
ZSH_THEME_GIT_PROMPT_SUFFIX="› %{$reset_color%}"
ForegroundColour=182,190,204
BackgroundColour=31,33,38
CursorColour=109,230,245
Black=30,34,42
BoldBlack=30,34,42
Red=255,123,133
BoldRed=255,123,133
Green=192,246,153
BoldGreen=192,246,153
Yellow=255,214,137
@anthonyclarka2
anthonyclarka2 / .vimrc
Created October 4, 2019 18:54
snippet of vimrc to set tabs to 2 spaces
" Copy and paste below line into remote vim sessions that aren't configured:
set tabstop=2 softtabstop=0 expandtab shiftwidth=2 smarttab
" Add the following to your ~/.vimrc to make it permanent:
set tabstop=2 " The width of a TAB is set to 4.
" Still it is a \t. It is just that
" Vim will interpret it to be having
" a width of 4.
set shiftwidth=2 " Indents will have a width of 4
@anthonyclarka2
anthonyclarka2 / month-calendar.tex
Created December 23, 2019 18:34
A LaTeX file to create a simple monthly calendar
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Monthly Calendar
% LaTeX Template
% Version 1.1 (19/9/2018)
%
% This template was downloaded from:
% http://www.LaTeXTemplates.com
%
% Original author:
% Evan Sultanik with modifications by
@anthonyclarka2
anthonyclarka2 / snippet.el
Created May 19, 2021 12:52
Choosing Emacs settings based on operating system
;; Taken from https://karl-voit.at/2017/02/11/my-system-is-foobar/
;; Check if system is Darwin/macOS
(defun my-system-type-is-darwin ()
"Return true if system is darwin-based (Mac OS X)"
(string-equal system-type "darwin")
)
;; Check if system is Microsoft Windows
(defun my-system-type-is-windows ()
"Return true if system is Windows-based (at least up to Win7)"