This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function deploy() { | |
| HOST=${1:-'[email protected]:SamuelDavis'} | |
| DOMAIN=${2:-'sdavis.online'} | |
| REMOTE_ORIGIN=$(git config --get remote.origin.url) | |
| if [ $? -ne 0 ]; then | |
| echo "Git repository not found." >&2 | |
| return | |
| fi | |
| REPO_NAME=$(basename -s .git $REMOTE_ORIGIN) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <link rel="icon" type="image/png" href="data:image/png;base64,iVBORw0KGgo="> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env bash | |
| # usage: Exec Path: gvim | |
| # Exec Args: {file} | |
| # default lspconfig.gdscript.setup() is fine | |
| SOCK="/tmp/godot.sock" | |
| FILE=${1} | |
| if [ -S "$SOCK" ]; then |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| services: | |
| nginx: | |
| image: nginx:alpine | |
| container_name: web | |
| depends_on: | |
| - php | |
| ports: | |
| - "80:80" | |
| - "443:443" | |
| volumes: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Run with `nix-shell cuda-shell.nix` | |
| { pkgs ? import <nixpkgs> {} }: | |
| pkgs.mkShell { | |
| name = "cuda-env-shell"; | |
| buildInputs = with pkgs; [ | |
| git gitRepo gnupg autoconf curl | |
| procps gnumake util-linux m4 gperf unzip | |
| cudatoolkit linuxPackages.nvidia_x11 | |
| libGLU libGL | |
| xorg.libXi xorg.libXmu freeglut |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| local args = vim.fn.argv(0) | |
| if arg ~= "" then | |
| local path = vim.fn.fnamemodify(args, ":p") | |
| if vim.fn.isdirectory(path) == 0 then | |
| path = vim.fn.fnamemodify(args, ":h") | |
| end | |
| if vim.fn.isdirectory(path) == 1 then | |
| vim.cmd.cd(path) | |
| vim.fn.remove(vim.v.argv, 1) | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Default config for sway | |
| # | |
| # Copy this to ~/.config/sway/config and edit it to your liking. | |
| # | |
| # Read `man 5 sway` for a complete reference. | |
| ### Variables | |
| # | |
| # Logo key. Use Mod1 for Alt. | |
| set $mod Mod4 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| docker-prune () { | |
| for CMD in "$@" | |
| do | |
| echo "Pruning ${CMD}s..." | |
| IDS=$(docker $CMD ls --all --quiet 2> /dev/null || docker $CMD ls --quiet) | |
| [ -z "$IDS" ] && echo "None found." && continue | |
| echo "$IDS" | xargs -L1 docker $CMD rm --force | |
| docker $CMD prune --force | |
| done | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| eval $(ssh-agent -s) 1> /dev/null | |
| export USER_ID=$(id --user) | |
| export GROUP_ID=$(id --group) | |
| export DENO_DIR="$HOME/.deno" | |
| PATH="$PATH:$HOME/.npm/bin" | |
| alias nixos-clean="sudo nix-collect-garbage --delete-old" | |
| alias nixos-list="sudo nix-env --list-generations --profile /nix/var/nix/profiles/system" | |
| alias dpa="dprune container volume network" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Edit this configuration file to define what should be installed on | |
| # your system. Help is available in the configuration.nix(5) man page | |
| # and in the NixOS manual (accessible by running ‘nixos-help’). | |
| { config, pkgs, lib, ... }: | |
| let | |
| unstablePkgs = import <unstable> { config = config.nixpkgs.config; }; | |
| in | |
| { |
NewerOlder