Skip to content

Instantly share code, notes, and snippets.

View davidpeach's full-sized avatar
🖥️
Working on Manuscript for composer package development

David Peach davidpeach

🖥️
Working on Manuscript for composer package development
View GitHub Profile
View .zshrc
# 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
View .tmux.conf
# 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
View ext-xdebug.ini
[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.
View whatdb-proposed-syntax.md

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 November 9, 2023 10:55
Traefik Configuration and Setup
View docker-compose.yml
version: "3.3"
services:
################################################
#### Traefik Proxy Setup #####
###############################################
traefik:
image: traefik:v2.0
restart: always
@A6GibKm
A6GibKm / mu4e.md
Last active July 19, 2023 20:36
Read your emails with mu4e
View mu4e.md

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
View create_4gbswapfile.sh
#!/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
@haringsrob
haringsrob / .vimrc
Created March 1, 2017 16:20
NeoVim as php IDE - Single file setup
View .vimrc
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
View sjcl-example.js
// 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);
@purpleP
purpleP / vim-tmux.md
Created January 29, 2017 00:37
How to run tests with tmux and vim
View vim-tmux.md

Running tests with vim and tmux

After using vim and neovim for almost a year now I've come to the point when frustration I had with running test with vim made me think about ideal workflow for running tests (at least in command line, but some rules apply to GUI).

Below you can read my thoughts about ideal workflow, a summary of problems with current workflows (at least that I know of, but I think I've tried them all) and my own new (well, at least I think it's new) solution to them.