Skip to content

Instantly share code, notes, and snippets.

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`
View golang-1.17+-git-enforce-ssh.md

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)
View clipage.sh
#!/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...
View colors.sh
#!/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
View query-times.sql.md

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
View get-f22cking-vim.sh
#/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)
View keychron-k2-function-keys-fedora33.md
@threeiem
threeiem / pantheon-design-work_Q1-2021.md
Last active February 13, 2021 02:32
Pantheon Design Work Q1-2021
View pantheon-design-work_Q1-2021.md
@threeiem
threeiem / git-update-feature-branch-merge.md
Created December 14, 2020 04:51
Updating a Feature Branch Using Merge
View keybase.md

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.
View multisite_aliases.drush.inc
<?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) {