Skip to content

Instantly share code, notes, and snippets.

Anthony Clark anthonyclarka2

  • Nexient
  • Ann Arbor, MI
Block or report user

Report or block anthonyclarka2

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View .spacemacs
;; -*- mode: emacs-lisp -*-
(defun dotspacemacs/layers ()
"Configuration Layers declaration.
You should not put any user code in this function besides modifying the variable
values."
(setq-default
dotspacemacs-distribution 'spacemacs
dotspacemacs-enable-lazy-installation 'unused
dotspacemacs-ask-for-lazy-installation t
@anthonyclarka2
anthonyclarka2 / .vimrc
Created Oct 4, 2019
snippet of vimrc to set tabs to 2 spaces
View .vimrc
" 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
View minttyrc
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 / afowler-nohost-root.zsh-theme
Created Sep 9, 2019
a simple modification of the oh-my-zsh theme "afowler" without the hostname included, and adding ROOT in red letters when $uid=0
View afowler-nohost-root.zsh-theme
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%}"
@anthonyclarka2
anthonyclarka2 / swap_check.sh
Created Sep 5, 2019 — forked from goiko74/swap_check.sh
display swap usage per PID (no sudo)
View swap_check.sh
#!/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
View mac pkg extract
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":
View .zshrc
# 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
@anthonyclarka2
anthonyclarka2 / attributes.rb
Created Apr 20, 2019 — forked from lizthegrey/attributes.rb
Hardening SSH with 2fa
View attributes.rb
default['sshd']['sshd_config']['AuthenticationMethods'] = 'publickey,keyboard-interactive:pam'
default['sshd']['sshd_config']['ChallengeResponseAuthentication'] = 'yes'
default['sshd']['sshd_config']['PasswordAuthentication'] = 'no'
View keybase.md

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 / .emacs
Created Apr 10, 2019
Emacs startup file for org-mode and org-mode Jira
View .emacs
;; global variables
(setq
inhibit-startup-screen t
create-lockfiles nil
make-backup-files nil
column-number-mode t
scroll-error-top-bottom t
show-paren-delay 0.5
use-package-always-ensure t
sentence-end-double-space nil)
You can’t perform that action at this time.