Skip to content

Instantly share code, notes, and snippets.

@kettanaito
kettanaito / README.md
Last active January 4, 2025 18:30
Chromium on Vercel (serveless)

Chromium on Vercel (serverless)

This is an up-to-date guide on running Chromium in Vercel serverless functions in 2022. What you will read below is the result of two days of research, debugging, 100+ failed deployments, and a little bit of stress.

Getting started

Step 1: Install dependencies

Use chrome-aws-lambda that comes with Chromium pre-configured to run in serverless, and puppeteer-core due to the smaller size of Chromium distributive.

@timvisee
timvisee / falsehoods-programming-time-list.md
Last active January 4, 2025 18:30
Falsehoods programmers believe about time, in a single list

Falsehoods programmers believe about time

This is a compiled list of falsehoods programmers tend to believe about working with time.

Don't re-invent a date time library yourself. If you think you understand everything about time, you're probably doing it wrong.

Falsehoods

  • There are always 24 hours in a day.
  • February is always 28 days long.
  • Any 24-hour period will always begin and end in the same day (or week, or month).
@kravietz
kravietz / nftables-host.conf
Last active January 4, 2025 18:29
Simple workstation nftables
#!/usr/sbin/nft -f
flush ruleset
table inet filter {
chain input {
type filter hook input priority 0; policy drop
iifname lo accept
ct state established,related accept
# allow any incoming ICMP and ICMPv6
@triangletodd
triangletodd / update_discord.sh
Created December 5, 2020 04:29
Update Discord on Debian
#!/usr/bin/env bash
set -e
trap "{ rm -f $tmpfile; }" EXIT
tmpfile="$(mktemp)"
main() {
curl -Lo "$tmpfile" 'https://discord.com/api/download?platform=linux'
sudo dpkg -i "$tmpfile"
@ikrishagarwal
ikrishagarwal / setup-zsh-in-codespaces.md
Last active January 4, 2025 18:29
Setup starship, zsh suggestions and syntax highlight for your codespaces.
@cr105ph1nx
cr105ph1nx / USTHB-ssi-resources.md
Last active January 4, 2025 18:27
Find here some resources you'll need to start your SSI journey... or survive through it ! Feel free to contribute if you've got resources of your own.
@pirafrank
pirafrank / disable-web-search.reg
Created November 4, 2024 08:55
Disable Web Search feature in Windows 10 and Windows 11 for faster searching in the Start Menu. Tested on Win 11 Pro, should work on all editions.
Windows Registry Editor Version 5.00
; Disable Web Search in Windows Search
[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Windows Search]
"DisableWebSearch"=dword:00000001
"ConnectedSearchUseWeb"=dword:00000000
"AllowCortana"=dword:00000000
; Additional Web Search Settings
[HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Search]
@diogogpinto
diogogpinto / Instructions.MD
Created January 3, 2025 13:14
Best Laravel AI Prompt to use with Claude

I have been utilizing artificial intelligence to enhance and optimize my codebases. After evaluating various models, applications, and editors, I find the claude.ai interface with a Pro Account to be the most effective. Here’s the approach I’ve developed to achieve optimal results:

This gist contains a carefully crafted prompt and a script designed to convert your entire Laravel codebase (excluding the resources folder, which can be easily added if needed) into a TXT file with the following structure:

<File Start: ./path/filename.extension> Content of file <End File: ./path/filename.extension>

To implement this method:

@disler
disler / README.md
Last active January 4, 2025 18:24
Four Level Framework for Prompt Engineering
@johnpolacek
johnpolacek / .gitconfig
Last active January 4, 2025 18:23
My current .gitconfig aliases
[alias]
recent = "!git for-each-ref --sort=-committerdate refs/heads/ --format='%(committerdate:short) %(refname:short)' | head -n 10"
co = checkout
cob = checkout -b
coo = !git fetch && git checkout
br = branch
brd = branch -d
brD = branch -D
merged = branch --merged
st = status