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 | |
| # Spawn-or-focus script for Niri window manager | |
| # Launches an application if not running, focuses it if already open, | |
| # or returns to previous window if the application is already focused. | |
| # | |
| # Usage: spawn-or-focus.sh <app-name> | |
| # | |
| # Example keybinding in niri config: | |
| # Mod+T { spawn "sh" "-c" "~/.config/niri/spawn-or-focus.sh terminal"; } |
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
| #!/bin/sh | |
| # Taken from https://github.com/driesvints/dotfiles/blob/main/ssh.sh | |
| echo "Generating a new SSH key for GitHub..." | |
| # Generating a new SSH key | |
| # https://docs.github.com/en/github/authenticating-to-github/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent#generating-a-new-ssh-key | |
| ssh-keygen -t ed25519 -C $1 -f ~/.ssh/id_ed25519 |
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
| { | |
| "name": "Iris Rev. 4", | |
| "vendorProductId": 3406840406, | |
| "macros": ["", "", "", "", "", "", "", "", "", "", "", "", "", "", "", ""], | |
| "layers": [ | |
| [ | |
| "KC_MPLY", | |
| "KC_1", | |
| "KC_2", | |
| "KC_3", |
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
| html.night { | |
| /* Rose Pine */ | |
| --base: #191724; | |
| --surface: #1f1d2e; | |
| --overlay: #26233a; | |
| --inactive: #555169; | |
| --subtle: #6e6a86; | |
| --subtle-light: #817c9c; | |
| --text: #e0def4; | |
| --love: #eb6f92; |
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
| const request = require("request-promise"); | |
| const cloudinary = require("cloudinary"); | |
| const config = { | |
| from: { | |
| cloud_name: "", | |
| api_key: "", | |
| api_secret: "", | |
| }, | |
| to: { |
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
| #!/bin/bash | |
| # THIS SCRIPT UPDATES EMBY TO THE LATEST STABLE VERSION | |
| # IF AN UPDATE IS AVAILABLE. | |
| # | |
| # Script must be run as root or with root priveleges | |
| # (like using sudo) | |
| # | |
| # !!! USE AT YOUR OWN RISK !!! | |
| # |
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 init(){ | |
| new SmoothScroll(document,120,12) | |
| } | |
| function SmoothScroll(target, speed, smooth) { | |
| if (target === document) | |
| target = (document.scrollingElement | |
| || document.documentElement | |
| || document.body.parentNode | |
| || document.body) // cross browser support for document scrolling |
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
| let starttime; | |
| function moveit(timestamp, x, duration){ | |
| const runtime = timestamp - starttime; | |
| let progress = Math.min((runtime / duration), 1); | |
| console.log(x * progress); | |
| if (runtime < duration) requestAnimationFrame(timestamp => moveit(timestamp, x, duration)); | |
| } | |
| requestAnimationFrame(timestamp => { |
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 ret_status="%(?:%{$fg_bold[green]%}➜ :%{$fg_bold[red]%}➜ %s)" | |
| PROMPT='%{$fg_bold[red]%}➜ %{$fg_bold[yellow]%}%~ %{$fg_bold[blue]%}$(git_prompt_info)%{$fg_bold[blue]%} % %{$reset_color%}' | |
| RPROMPT='%{$fg[blue]%}[%*]%{$reset_color%}' | |
| ZSH_THEME_GIT_PROMPT_PREFIX="git:(%{$fg[red]%}" | |
| ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}" | |
| ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[blue]%}) %{$fg[red]%}✗%{$reset_color%}" | |
| ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg[blue]%}) %{$fg[green]%}✔%{$reset_color%}" |
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
| import socket | |
| import argparse | |
| import subprocess | |
| if __name__ == "__main__": | |
| p = argparse.ArgumentParser() | |
| p.add_argument("port", type=int) | |
| args = p.parse_args() | |
| sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) |