Skip to content

Instantly share code, notes, and snippets.

View davidpeach's full-sized avatar
🖥️
I use Arch btw

David Peach davidpeach

🖥️
I use Arch btw
View GitHub Profile
# Enable Powerlevel10k instant prompt. Should stay close to the top of ~/.zshrc.
# Initialization code that may require console input (password prompts, [y/n]
# confirmations, etc.) must go above this block; everything else may go below.
if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then
source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh"
fi
# If you come from bash you might have to change your $PATH.
# export PATH=$HOME/bin:/usr/local/bin:$PATH
# Set vi key bindings mode
set -g mode-keys vi
set -g status-keys vi
# Set new panes to open in current directory
bind c new-window -c "#{pane_current_path}"
bind '"' split-window -c "#{pane_current_path}"
bind % split-window -h -c "#{pane_current_path}"
# List of plugins
@tuto1902
tuto1902 / ext-xdebug.ini
Created April 24, 2021 19:46
XDebug configuration file
[xdebug]
xdebug.start_with_request=yes
xdebug.discover_client_host=true
xdebug.max_nesting_level=256
xdebug.remote_handler=dbgp
xdebug.client_port=9000
xdebug.idekey=VSCODE
xdebug.mode=debug
xdebug.client_host=host.docker.internal
@aral
aral / whatdb-proposed-syntax.md
Last active May 31, 2023 13:16
WhatDB? Proposed syntax.

WhatDB?

Proposed syntax.

Preparing a query

Internally, this prepares the predicate for an array.filter() operation.

.where( propertyName ) : Start query. Returns query object.
@Mau5Machine
Mau5Machine / docker-compose.yml
Last active April 9, 2024 16:00
Traefik Configuration and Setup
version: "3.3"
services:
################################################
#### Traefik Proxy Setup #####
###############################################
traefik:
image: traefik:v2.0
restart: always
@A6GibKm
A6GibKm / mu4e.md
Last active April 21, 2024 12:13
Read your emails with mu4e

Connecting emacs and Protonmail Bridge

This guide will cover the basics on how to integrate emacs with protonmail-bridge using

Configuring mbsync

@Tiryoh
Tiryoh / create_4gbswapfile.sh
Created July 12, 2019 14:41
create 4GB swapfile on Linux
#!/usr/bin/env bash
set -eu
sudo dd if=/dev/zero of=/var/swapfile bs=1M count=4096
sudo mkswap /var/swapfile
sudo chmod 600 /var/swapfile
sudo swapon /var/swapfile
sudo cat /proc/swaps
echo "/var/swapfile swap swap defaults 0 0" | sudo tee -a /etc/fstab
@fnky
fnky / ANSI.md
Last active May 19, 2024 22:45
ANSI Escape Codes

ANSI Escape Sequences

Standard escape codes are prefixed with Escape:

  • Ctrl-Key: ^[
  • Octal: \033
  • Unicode: \u001b
  • Hexadecimal: \x1B
  • Decimal: 27
@haringsrob
haringsrob / .vimrc
Created March 1, 2017 16:20
NeoVim as php IDE - Single file setup
call plug#begin('~/.local/share/nvim/plugged')
Plug 'tpope/vim-fugitive'
Plug 'airblade/vim-gitgutter'
Plug 'martinda/Jenkinsfile-vim-syntax'
Plug 'c9s/phpunit.vim'
Plug 'scrooloose/nerdtree'
Plug 'jistr/vim-nerdtree-tabs'
Plug 'kien/ctrlp.vim'
Plug 'easymotion/vim-easymotion'
Plug 'StanAngeloff/php.vim'
@yetanotherchris
yetanotherchris / sjcl-example.js
Created February 5, 2017 18:27
Stanford Javascript Crypto Library basic AES example
// Basic AES example using the defaults.
// https://github.com/bitwiseshiftleft/sjcl
var password = "password";
var text = "my secret text";
var parameters = { "iter" : 1000 };
var rp = {};
var cipherTextJson = {};
sjcl.misc.cachedPbkdf2(password, parameters);