Skip to content

Instantly share code, notes, and snippets.

View StevenBlack's full-sized avatar
🇨🇦

Steven Black StevenBlack

🇨🇦
View GitHub Profile
@StevenBlack
StevenBlack / debian_setup.sh
Created August 20, 2023 17:29
Debian setup
#!/bin/sh
cd ~
rm -rf Music
rm -rf Pictures
rm -rf Documents
rm -rf Videos
rm -rf Templates
rm -rf Public
mkdir projects
@StevenBlack
StevenBlack / contribution-history.md
Last active July 30, 2022 03:18
Source Host Files' Contribution History
@StevenBlack
StevenBlack / 100bytes.css
Created June 18, 2022 15:09
Between 100 and 200 bytes of solid css.
// source: https://www.swyx.io/css-100-bytes
html {
max-width: 70ch;
padding: 3em 1em;
margin: auto;
line-height: 1.75;
font-size: 1.25em;
}
h1,h2,h3,h4,h5,h6 {
@StevenBlack
StevenBlack / 1M-TLD.md
Created June 16, 2022 15:16
Top 1-million domains TLD breakdown

See the conversation here: StevenBlack/hosts#1956

$ ghosts --tld -m /Users/steve/Downloads/top-1m.txt   

----------------------------------------
Base hosts file summary:
----------------------------------------
Location: /Users/steve/Downloads/top-1m.txt
Domains: 999,295
@StevenBlack
StevenBlack / pullall.sh
Last active April 16, 2022 21:15
git pull in all sub directories
# Run "git pull" in each subdirectory of the current directory.
# Useful when you store all of your git repos in one folder.
clear
for dir in ./*; # For every item in the folder:
do (
if [ -d "$dir" ]; # If it is a directory:
then (
echo "$dir" && # Print the path,
@StevenBlack
StevenBlack / MacOS Allow Apps from any developer.sh
Created April 15, 2022 16:44
MacOS allow apps from any developer
sudo spctl --master-disable
@StevenBlack
StevenBlack / shtdn.bat
Created February 11, 2022 23:08
Shutdown a remote network machine
shutdown -r -m \\MachineName -t -0
@StevenBlack
StevenBlack / elapsed.rs
Created January 25, 2022 05:50
Rust elapsed time
use std::time::Instant;
let start = Instant::now();
let mut lines: Vec<String> = self.raw_list.clone();
println!("clone {}", start.elapsed().as_millis());
@StevenBlack
StevenBlack / named_colors.sql
Last active January 17, 2022 17:12
Several hundred named colors with hex codes.
-- collected from various sources on the web.
select * from (
('Absolute zero','#0048BA'),
('Acid green','#B0BF1A'),
('Aero','#7CB9E8'),
('Aero blue','#C9FFE5'),
('African violet','#B284BE'),
('Air Force blue (RAF)','#5D8AA8'),
('Air Force blue (USAF)','#00308F'),
@StevenBlack
StevenBlack / 1-setup.md
Created November 16, 2021 21:05 — forked from troyfontaine/1-setup.md
Signing your Git Commits using GPG on MacOS Sierra/High Sierra

Methods of Signing with GPG

Last updated March 28, 2021

There are now two ways to approach this:

  1. Using gpg and generating keys
  2. Using Kryptonite by krypt.co

This Gist explains how to do this using gpg in a step-by-step fashion. Kryptonite is actually wickedly easy to use-but you will still need to follow the instructions