Skip to content

Instantly share code, notes, and snippets.

View rugbyprof's full-sized avatar

Terry Griffin rugbyprof

View GitHub Profile
@rugbyprof
rugbyprof / griffin.zsh-theme
Created October 2, 2024 19:35
grifin zsh theme
# Digital Ocean Natted IP for private nets
NATADDR=0.0.0.0
setopt promptsubst
setopt promptpercent
# crunch theme colorpreset examples
# esembeh
@rugbyprof
rugbyprof / .zshrc
Last active October 15, 2024 16:59
zshrc file with many shortcuts
# =====================================================================================
# 1. PATH SETUP
# =====================================================================================
#export PATH=/bin:/usr/bin:/usr/local/bin
export TEXINPUTS=/Users/yourUserName/.TexConfigs//:
# For SFML programming
export LD_LIBRARY_PATH=/usr/local/bin/SFML-2.5.0-macOS-clang/lib
@rugbyprof
rugbyprof / friend.cpp
Created September 14, 2024 07:17
Simple Example of the Friend keyword in C++. Not much practicality but its different than using it for ostream.
// THIS CODE WILL ERROR
#include <iostream>
#include <string>
#include <vector>
using namespace std;
class A {
private:
int private_part;
@rugbyprof
rugbyprof / list_print.cpp
Last active September 14, 2024 06:37
list traversal
void LinkedList::print() {
Node *travel = front; // Line 1
while (travel) { // Line 2
// do stuff here
travel = travel->next; // Line 3
}
}
for i in range(100,1,-1):
print(f"{i} bottles of beer on the wall, {i} bottles of beer.")
print(f"Take one down, pass it around, {i-1} bottles of beer on the wall.")
#include <iostream>
using namespace std;
int main(int argc, char *argv[]) {
for (int i = 99; i > 0; i--) {
cout << i << " Bottles of beer on the wall " << i << " bottles of beer.\n";
cout << "Take one down, pass it around, " << (i - 1)
@rugbyprof
rugbyprof / update.sh
Created December 5, 2023 09:41
Simple setup script of my droplets
apt update && apt upgrade -y
apt install git
apt install zsh
apt install wget
chsh -s /bin/zsh root
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
cp ~/.zshrc ~/.zshrc.hold
# Digital Ocean Natted IP for private nets
NATADDR=0.0.0.0
setopt promptsubst
setopt promptpercent
# crunch theme colorpreset examples
# esembeh
@rugbyprof
rugbyprof / .zshrc_append
Created December 5, 2023 09:33
Additional zshrc quick commands
# =====================================================================================
# MY STUFF
# =====================================================================================
# User configuration
export EDITOR=nano
alias cp='cp -i' # Preferred 'cp' implementation
alias cpp='cp -iv' # Preferred 'cp' implementation
alias mv='mv -iv' # Preferred 'mv' implementation
@rugbyprof
rugbyprof / .clang-format
Created February 25, 2023 22:04
clang format
Standard: Cpp11
BasedOnStyle: LLVM
IndentWidth: 4
ColumnLimit: 0
AccessModifierOffset: -4
NamespaceIndentation: All
BreakBeforeBraces: Custom
BraceWrapping:
AfterEnum: false
AfterStruct: false