Skip to content

Instantly share code, notes, and snippets.

# generated by Git for Windows
test -f ~/.profile && . ~/.profile
test -f ~/.bashrc && . ~/.bashrc
@mateuszjurewicz
mateuszjurewicz / keybindings.json
Last active April 29, 2025 17:27
VSCode keybindings
// Place your key bindings in this file to override the defaultsauto[]
// some useful notes:
// - to toggle between various files open in editor: `ctrl + tab`
// - to jump between open panes of editor: `ctrl + 1` for left one, `ctrl + 2` for right one
// - to toggle between terminal and editor (custom): `ctrl + <backtick>`
// - to jump back to editor from wherever (custom): `ctrl + opt/alt + cmd`
// - to open Copilot Chat (custom): `ctrl + shift + a`
[
{
[battery]
full_symbol = ""
charging_symbol = ""
discharging_symbol = ""
unknown_symbol = ""
empty_symbol = ""
[erlang]
symbol = ""
set bell-style none
# 2024-09-23 Alias list from Oh My Zsh git plugin
# Increase history size
HISTSIZE=10000
HISTFILESIZE=20000
# Save multi-line commands as a single entry
shopt -s cmdhist
# Append to the history file, don't overwrite it
@jamiebergen
jamiebergen / _description.md
Last active April 29, 2025 17:26
Gitignore whitelist approach #git
@antifuchs
antifuchs / dock.nix
Last active April 29, 2025 17:26
A nix module that arranges the macOS dock the way you want it. Note: It won't allow you to manually re-arrange the items on it; the dock gets reset everytime you log in.
{ config, pkgs, lib, ... }:
with lib;
let
cfg = config.local.dock;
stdenv = pkgs.stdenv;
in
{
options = {
local.dock.enable = mkOption {
description = "Enable dock";
@amit
amit / db.rake
Last active April 29, 2025 17:26 — forked from hopsoft/db.rake
Update for rails 7.0.X and handle postgres password
# apt install postgresql-client
# apt-get -y install bash-completion wget
# wget --no-check-certificate --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add -
# echo "deb http://apt.postgresql.org/pub/repos/apt/ `lsb_release -cs`-pgdg main" | sudo tee /etc/apt/sources.list.d/pgdg.list
# apt-get update
# apt-get -y install postgresql-client-12
namespace :db do
desc "Dumps the database to backups"
@gerard-kanters
gerard-kanters / inactivity.js
Last active April 29, 2025 17:25
Inactivity timeout javascript
<script type="text/javascript">
function idleTimer() {
var t;
//window.onload = resetTimer;
window.onmousemove = resetTimer; // catches mouse movements
window.onmousedown = resetTimer; // catches mouse movements
window.onclick = resetTimer; // catches mouse clicks
window.onscroll = resetTimer; // catches scrolling
window.onkeypress = resetTimer; //catches keyboard actions