Skip to content

Instantly share code, notes, and snippets.

View andrew-werdna's full-sized avatar

Andrew Brown andrew-werdna

  • Austin, Texas
  • 18:45 (UTC -05:00)
View GitHub Profile
@nat-418
nat-418 / a-basic-home-manager.md
Last active January 16, 2024 14:55
An example Home Manager configuration

A basic Home Manager configuration

These files show a simplified real-world example of how to use Home Manager to setup Neovim, Xfce, and some command-line user tools.

@m-radzikowski
m-radzikowski / script-template.sh
Last active February 29, 2024 04:20
Minimal safe Bash script template - see the article with full description: https://betterdev.blog/minimal-safe-bash-script-template/
#!/usr/bin/env bash
set -Eeuo pipefail
trap cleanup SIGINT SIGTERM ERR EXIT
script_dir=$(cd "$(dirname "${BASH_SOURCE[0]}")" &>/dev/null && pwd -P)
usage() {
cat <<EOF
Usage: $(basename "${BASH_SOURCE[0]}") [-h] [-v] [-f] -p param_value arg1 [arg2...]
@mbbx6spp
mbbx6spp / git-tips-part-1.org
Last active April 29, 2023 02:17
Git tips and tricks for dev group presentation

Git Tips

Config

Git has different levels of configuration that apply to different /”scopes”/:

  • system (almost never needed; not covered here)
  • global (which is /”global for a user”/ scoped)
  • local (which is specific to one local clone)
  • worktree (which only applies to the current worktree; only relevant if you work with worktree s)
  • file (not covered here but you can set a git configuration option, when relevant at the file level, to one file)
@onlurking
onlurking / programming-as-theory-building.md
Last active March 16, 2024 00:01
Programming as Theory Building - Peter Naur

Programming as Theory Building

Peter Naur

Peter Naur's classic 1985 essay "Programming as Theory Building" argues that a program is not its source code. A program is a shared mental construct (he uses the word theory) that lives in the minds of the people who work on it. If you lose the people, you lose the program. The code is merely a written representation of the program, and it's lossy, so you can't reconstruct

@miguelgrinberg
miguelgrinberg / .vimrc
Last active March 26, 2024 14:15
My .vimrc configuration for working in Python with vim
" plugins
let need_to_install_plugins = 0
if empty(glob('~/.vim/autoload/plug.vim'))
silent !curl -fLo ~/.vim/autoload/plug.vim --create-dirs
\ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
let need_to_install_plugins = 1
endif
call plug#begin()
Plug 'tpope/vim-sensible'
@KATT
KATT / favourite-ts-tricks.md
Last active July 26, 2023 06:16
🧙‍♂️ Favourite non-obvious TS tricks

Record<string, x | undefined>

Represent maps

// rather than 
const map: {[ key: string ]: string} = {
  foo: 'bar',
}
@sundowndev
sundowndev / GoogleDorking.md
Last active March 26, 2024 15:31
Google dork cheatsheet

Google dork cheatsheet

Search filters

Filter Description Example
allintext Searches for occurrences of all the keywords given. allintext:"keyword"
intext Searches for the occurrences of keywords all at once or one at a time. intext:"keyword"
inurl Searches for a URL matching one of the keywords. inurl:"keyword"
allinurl Searches for a URL matching all the keywords in the query. allinurl:"keyword"
intitle Searches for occurrences of keywords in title all or one. intitle:"keyword"
@enricofoltran
enricofoltran / main.go
Last active March 23, 2024 16:41
A simple golang web server with basic logging, tracing, health check, graceful shutdown and zero dependencies
package main
import (
"context"
"flag"
"fmt"
"log"
"net/http"
"os"
"os/signal"
@chronon
chronon / ext.txt
Created February 18, 2017 15:38
List of docker-php-ext-install extension names
Possible values for ext-name:
bcmath
bz2
calendar
ctype
curl
dba
dom
enchant
@remarkablemark
remarkablemark / Dockerfile
Last active March 15, 2024 07:10
Install node and npm with nvm using Docker.
# set the base image to Debian
# https://hub.docker.com/_/debian/
FROM debian:latest
# replace shell with bash so we can source files
RUN rm /bin/sh && ln -s /bin/bash /bin/sh
# update the repository sources list
# and install dependencies
RUN apt-get update \