Skip to content

Instantly share code, notes, and snippets.

View cooperpellaton's full-sized avatar
👨‍🎨
Making memes!

Cooper Pellaton cooperpellaton

👨‍🎨
Making memes!
View GitHub Profile
@cmod
cmod / hugofastsearch.md
Last active July 2, 2025 03:11 — forked from eddiewebb/readme.md
Fast, instant client side search for Hugo static site generator

With GitHub Actions, a workflow can publish artifacts, typically logs or binaries. As of early 2020, the life time of an artifact is hard-coded to 90 days (this may change in the future). After 90 days, an artifact is automatically deleted. But, in the meantime, artifacts for a repository may accumulate and generate mega-bytes or even giga-bytes of data files.

It is unclear if there is a size limit for the total accumulated size of artifacts for a public repository. But GitHub cannot reasonably let multi-giga-bytes of artifacts data accumulate without doing anything. So, if your workflows regularly produce large artifacts (such as "nightly build" procedures for instance), it is wise to cleanup and delete older artifacts without waiting for the 90 days limit.

Using the Web page for the "Actions" of a repository, it is possible to browse old workflow runs and manually delete artifacts. But the procedure is slow and tedious. It is fine to delete one selected artifact. It is not for a regular cleanup. We need

@JoeyBurzynski
JoeyBurzynski / 55-bytes-of-css.md
Last active June 18, 2025 19:09
58 bytes of css to look great nearly everywhere

58 bytes of CSS to look great nearly everywhere

When making this website, i wanted a simple, reasonable way to make it look good on most displays. Not counting any minimization techniques, the following 58 bytes worked well for me:

main {
  max-width: 38rem;
  padding: 2rem;
  margin: auto;
}
@gagarine
gagarine / fish_install.md
Last active July 2, 2025 09:47
Install fish shell on macOS Mojave with brew

Installing Fish shell on MacOS (Intel and M1) using brew

Fish is a smart and user-friendly command line (like bash or zsh). This is how you can instal Fish on MacOS and make your default shell.

Note that you need the https://brew.sh/ package manager installed on your machine.

Install Fish

brew install fish

@cooperpellaton
cooperpellaton / choco-bootstrap.ps1
Last active March 7, 2021 23:54
🍫 A PowerShell script that self-elevates and installs programs from Chocolatey.
# List of packages to be installed.
$Packages = 'firefox', 'vlc', '7zip', 'vscode', `
'everything', 'sharex', 'scansnapmanager', 'steam', 'discord', `
'Revo.Uninstaller', 'battle.net'
# Packages that won't be installed and the user will be reminded of.
$Extras = "Windows Store apps, Oculus, AMD/Radeon Drivers"
# Get the ID and security principal of the current user account
$myWindowsID = [System.Security.Principal.WindowsIdentity]::GetCurrent()
$myWindowsPrincipal = new-object System.Security.Principal.WindowsPrincipal($myWindowsID)
#!/bin/bash
set -e
CONTENTS=$(tesseract -c language_model_penalty_non_dict_word=0.8 --tessdata-dir /usr/local/share/tessdata/ "$1" stdout -l eng | xml esc)
hex=$((cat <<EOF
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
@sidsenkumar11
sidsenkumar11 / README.md
Last active March 30, 2025 14:46
GDB Tutorial

GDB for the Uninitiated

Overview

You're working on a C project for CS 2200. There's 2 days left before the assignment is due and for some reason, you're getting a segmentation fault after writing your last function. You've looked over your code 23 times but you just can't figure out where the bug is! Giving up and calling it a day, you decide to go to office hours and ask a TA for help.

If it sounds like this might be you in the near future, then allow me to run through a typical scenario for what happens when you come in and ask for help. You'll sit down, wait for 30 minutes while the TAs get through the queue of students asking questions, and finally notice that it's your turn next. The TA will walk over and ask you what's up. You'll explain that your code is seg-faulting and for the life of you, you can't figure out why. So the TA will take a quick peak at your code for any obvious errors, and then ask you the following question:

Did you run it through GDB?

@wangruohui
wangruohui / Install NVIDIA Driver and CUDA.md
Last active May 7, 2025 16:40
Install NVIDIA Driver and CUDA on Ubuntu / CentOS / Fedora Linux OS
# Make sure you grab the latest version
curl -OL https://github.com/google/protobuf/releases/download/v3.2.0/protoc-3.2.0-linux-x86_64.zip
# Unzip
unzip protoc-3.2.0-linux-x86_64.zip -d protoc3
# Move protoc to /usr/local/bin/
sudo mv protoc3/bin/* /usr/local/bin/
# Move protoc3/include to /usr/local/include/
@vasanthk
vasanthk / System Design.md
Last active July 10, 2025 04:31
System Design Cheatsheet

System Design Cheatsheet

Picking the right architecture = Picking the right battles + Managing trade-offs

Basic Steps

  1. Clarify and agree on the scope of the system
  • User cases (description of sequences of events that, taken together, lead to a system doing something useful)
    • Who is going to use it?
    • How are they going to use it?