Skip to content

Instantly share code, notes, and snippets.

@JBlond
JBlond / bash-colors.md
Last active April 23, 2024 00:02 — forked from iamnewton/bash-colors.md
The entire table of ANSI color codes.

Regular Colors

Value Color
\e[0;30m Black
\e[0;31m Red
\e[0;32m Green
\e[0;33m Yellow
\e[0;34m Blue
\e[0;35m Purple
@kgriffs
kgriffs / string_util.lua
Created May 27, 2020 17:41
Lua string utilities (contains, startswith, endswith, replace, insert)
function string:contains(sub)
return self:find(sub, 1, true) ~= nil
end
function string:startswith(start)
return self:sub(1, #start) == start
end
function string:endswith(ending)
@tsiege
tsiege / The Technical Interview Cheat Sheet.md
Last active April 20, 2024 16:52
This is my technical interview cheat sheet. Feel free to fork it or do whatever you want with it. PLEASE let me know if there are any errors or if anything crucial is missing. I will add more links soon.

ANNOUNCEMENT

I have moved this over to the Tech Interview Cheat Sheet Repo and has been expanded and even has code challenges you can run and practice against!






\

@ygotthilf
ygotthilf / jwtRS256.sh
Last active April 17, 2024 04:10
How to generate JWT RS256 key
ssh-keygen -t rsa -b 4096 -m PEM -f jwtRS256.key
# Don't add passphrase
openssl rsa -in jwtRS256.key -pubout -outform PEM -out jwtRS256.key.pub
cat jwtRS256.key
cat jwtRS256.key.pub
@ogrrd
ogrrd / dnsmasq OS X.md
Last active April 16, 2024 20:28
Setup dnsmasq on OS X

Never touch your local /etc/hosts file in OS X again

To setup your computer to work with *.test domains, e.g. project.test, awesome.test and so on, without having to add to your hosts file each time.

Requirements

Install

@gbaman
gbaman / HowToOTGFast.md
Last active April 16, 2024 06:29
Simple guide for setting up OTG modes on the Raspberry Pi Zero, the fast way!

Setting up Pi Zero OTG - The quick way (No USB keyboard, mouse, HDMI monitor needed)

More details - http://blog.gbaman.info/?p=791

For this method, alongside your Pi Zero, MicroUSB cable and MicroSD card, only an additional computer is required, which can be running Windows (with Bonjour, iTunes or Quicktime installed), Mac OS or Linux (with Avahi Daemon installed, for example Ubuntu has it built in).
1. Flash Raspbian Jessie full or Raspbian Jessie Lite onto the SD card.
2. Once Raspbian is flashed, open up the boot partition (in Windows Explorer, Finder etc) and add to the bottom of the config.txt file dtoverlay=dwc2 on a new line, then save the file.
3. If using a recent release of Jessie (Dec 2016 onwards), then create a new file simply called ssh in the SD card as well. By default SSH i

@HaleTom
HaleTom / print256colours.sh
Last active April 14, 2024 13:35
Print a 256-colour test pattern in the terminal
#!/bin/bash
# Tom Hale, 2016. MIT Licence.
# Print out 256 colours, with each number printed in its corresponding colour
# See http://askubuntu.com/questions/821157/print-a-256-color-test-pattern-in-the-terminal/821163#821163
set -eu # Fail on errors or undeclared variables
printable_colours=256
@alexweberk
alexweberk / mlx_finetuning_gemma.ipynb
Last active April 13, 2024 12:48
MLX Fine-tuning Google Gemma
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@kamilogorek
kamilogorek / _screenshot.md
Last active April 9, 2024 21:18
Clutter-free VS Code Setup
image
@jeroenvollenbrock
jeroenvollenbrock / aws-cloudfront-basic-auth.js
Last active April 8, 2024 15:51
AWS-CloudFront-basic-auth
var USERS = {
protecteddir: [{
username: 'user',
password: 'pass',
}],
};
//Response when auth is not valid.
var response401 = {
statusCode: 401,