Skip to content

Instantly share code, notes, and snippets.

View threeiem's full-sized avatar
🐧
teh lunix

Phil Cogbill threeiem

🐧
teh lunix
View GitHub Profile
@threeiem
threeiem / golang-1.17+-git-enforce-ssh.md
Last active February 23, 2022 23:19
Get Golang v1.17+ `go get` to enforce `ssh`

Go 1.17+ Terminal Prompts

After upgrading to go 1.17+ then you will start to see this error.

fatal: could not read Username for 'https://github.com': terminal prompts disabled

Common Error

@threeiem
threeiem / clipage.sh
Created November 25, 2021 00:02
Clipboard to image/png (X powered)
#!/usr/bin/env bash
set -euo pipefail
TARGET=${1:-"${HOME}/clipage.$(date -I).${RANDOM}.png"}
xclip -selection clipboard -t image/png -o > ${TARGET}
@threeiem
threeiem / colors.sh
Created November 7, 2021 21:52
Colors are life...
#!/usr/bin/env bash
################################################################################
# Colors
#
# File that contains all the local colors in semi easy to use strings. Thse can
# be mixed together to get the desired color intensity and background.
#
################################################################################
@threeiem
threeiem / query-times.sql.md
Last active November 8, 2021 18:59
Get SQL query times from MariaDB

Get slow queries from MariaDB without Sleep

When you are looking at a busy database there is more to see. If you have a lot of Sleep processes they all show up and not the slow query you need. This query helps pull out all the queries that have been running longer than 2 second and aren't Sleep.

SELECT time, state, info FROM information_schema.processlist WHERE command != 'Sleep' AND time >= 2 ORDER BY time DESC, id;
@threeiem
threeiem / get-f22cking-vim.sh
Created June 2, 2021 23:46
Fedora 22 vi update to vim
#/usr/bin/env bash
set -euo pipefail
IFS=$'\n\t'
# Update vim-minimal.(deps tied to man pages, etc. fixed)
dnf clean all
dnf update -v --debugsolver vim-minimal -y
dnf install vim -y
@threeiem
threeiem / keychron-k2-function-keys-fedora33.md
Last active September 1, 2022 05:17
Keychron K2 Function and Multimedia Keys (Fedora)

Keychron K2 or C1 Funtion and Multimedia Keys (Fedora)

Keyboard Mode Switch

On the left hand side of the keyboard there are two switches. Slide the switch closest to the USB port to "Win/Android". The writing can be very difficult to read because of the small letters. The "Win/Android" position on the switch is closest to the USB port.

Keyboard Mode for Function and Multimedia Keys

@threeiem
threeiem / pantheon-design-work_Q1-2021.md
Last active February 13, 2021 02:32
Pantheon Design Work Q1-2021

Pantheon Design Work Q1-2021

Pantheon Identity Desktop Backgrounds

Provide an extruded version of the Pantheon logo on a dark background.

Design Cues

  • Identity offset from center
  • Identity is 3D
@threeiem
threeiem / git-update-feature-branch-merge.md
Created December 14, 2020 04:51
Updating a Feature Branch Using Merge

Updating a Feature Branch Using Merge

Updating main

Update the local main branch.

git checkout main

Keybase proof

I hereby claim:

  • I am threeiem on github.
  • I am threeiem (https://keybase.io/threeiem) on keybase.
  • I have a public key ASB4cTADeRfzhfCP-lzQWF_YfY_AK6hKWMBnwqj6co7K5wo

To claim this, I am signing this object:

@threeiem
threeiem / multisite_aliases.drush.inc
Last active August 29, 2015 14:25
Drush to return all the local aliases for drush. Used for multisite installations.
<?php
/**
* Get Local Alaises.
*
* Returns an array that is indexed by it's alias ID without that '@'.
*
* @return array Returns an array of local sites in the Drush site aliases.
*/
function _multisite_get_local_alias($group = NULL) {