Skip to content

Instantly share code, notes, and snippets.

Avatar
🪵
ITS BETTER THAN BAD, ITS GOOD!

Logan Linn loganlinn

🪵
ITS BETTER THAN BAD, ITS GOOD!
View GitHub Profile
@loganlinn
loganlinn / console.js
Created Jan 25, 2022
Bulk delete custom Slack emojis with filter
View console.js
intervalId = setInterval(function() {
els = Array.from(
document.getElementsByClassName("c-virtual_list__item")
).filter(
(el) => el.innerText.includes(":azure_")
)
console.log("Matches found:", els.length)
if (!els.length) {
clearInterval(intervalId)
@loganlinn
loganlinn / spacemacs-keybindings
Created Jan 24, 2022 — forked from adham90/spacemacs-keybindings
spacemacs keybindings that i need to learn
View spacemacs-keybindings
SPC s c remove highlight
**** Files manipulations key bindings
Files manipulation commands (start with ~f~):
| Key Binding | Description |
|-------------+----------------------------------------------------------------|
| ~SPC f c~ | copy current file to a different location |
| ~SPC f C d~ | convert file from unix to dos encoding |
| ~SPC f C u~ | convert file from dos to unix encoding |
@loganlinn
loganlinn / gfo.org
Last active Jan 22, 2022
GitHub-Flavored Org tests
View gfo.org
** Internal links
   :PROPERTIES:
   :ID:       0d2b0cb2-116c-4a61-a076-4c641faf4346
   :END:

Internal links

View webinstall.dev-api-installers-zoxide.sh
#!/bin/bash
# shellcheck disable=2001
# because I prefer to use sed rather than bash replace
# (there's too little space in my head to learn both syntaxes)
function __bootstrap_webi() {
set -e
set -u
@loganlinn
loganlinn / poly
Last active Dec 10, 2021
Wrapper script for Polylith
View poly
#!/usr/bin/env bash
# Ensure this file is executable via `chmod a+x poly`, then place it
# somewhere on your $PATH, like ~/bin. The rest of Polylith will be
# installed upon first run into the ~/.polylith/self-installs directory.
export POLY_VERSION="0.2.13-alpha"
export POLY_CHECKSUM="88b37ddaabab73cf83d29b7b1f06a0f93146a1e165f43bc4792ebbb0a9a6a122"
export POLY_RELEASE="v$POLY_VERSION"
export POLY_JARNAME="poly-$POLY_VERSION.jar"
View dogstatsd_socket_patch.yaml
- op: add
path: /spec/template/spec/containers/0/volumeMounts/-
value:
name: dsdsocket
mountPath: /var/run/datadog
- op: add
path: /spec/template/spec/volumes/-
value:
name: dsdsocket
@loganlinn
loganlinn / gitlab-terraform-state-env
Last active Oct 28, 2021
Shell setup for Gitlab-managed Terraform State
View gitlab-terraform-state-env
#!/bin/sh
# Shell setup for Gitlab-managed Terraform State
# Options
: "${GITLAB_TERRAFORM_STATE_NAME:=$(git rev-parse --show-prefix | sed -e 's/[^[:alnum:]]/-/g' | tr -s - | tr A-Z a-z | sed -e 's/-$//')}"
# Defaults for [GitLab CI/CD Predefined Variables](https://docs.gitlab.com/ee/ci/variables/predefined_variables.html)
: "${CI_PROJECT_PATH=$(git remote -v | awk '{print $2}' | sed -e 's;^git@gitlab.com:;;' -e 's;^https\?://gitlab\.com/;;' -e 's;\.git$;;' | head -n1)}"
: "${CI_PROJECT_ID="$(printf %s "$CI_PROJECT_PATH" | sed -e 's;/;%2F;g')"}"
: "${CI_API_V4_URL=https://gitlab.com/api/v4}"
@loganlinn
loganlinn / hosts
Created Oct 23, 2021
personal mirror for racaljk/hosts
View hosts
# Copyright (c) 2014-2017, racaljk.
# https://github.com/racaljk/hosts
# Last updated: 2017-08-05
# This work is licensed under a CC BY-NC-SA 4.0 International License.
# https://creativecommons.org/licenses/by-nc-sa/4.0/
# Modified Hosts Start
# Localhost (DO NOT REMOVE) Start
@loganlinn
loganlinn / print256colours.sh
Created Oct 18, 2021 — forked from HaleTom/print256colours.sh
Print a 256-colour test pattern in the terminal
View print256colours.sh
#!/bin/bash
# Tom Hale, 2016. MIT Licence.
# Print out 256 colours, with each number printed in its corresponding colour
# See http://askubuntu.com/questions/821157/print-a-256-color-test-pattern-in-the-terminal/821163#821163
set -eu # Fail on errors or undeclared variables
printable_colours=256
View language_name_endonym_code.json
[
{
"name": "аҧсуа бызшәа, аҧсшәа",
"english_name": "Abkhazian",
"code": "ab"
},
{
"name": "Afaraf",
"english_name": "Afar",
"code": "aa"