Skip to content

Instantly share code, notes, and snippets.

@codegoalie
codegoalie / resub.sh
Created Jun 3, 2021
(Re)watch all of your own repos using gh cli
View resub.sh
$ gh api graphql --paginate -f query='
query($endCursor: String) {
viewer {
repositories(first: 100, after: $endCursor) {
nodes { nameWithOwner }
pageInfo {
hasNextPage
endCursor
}
}
View redirect-on-cookie.js
@codegoalie
codegoalie / file.js
Created Feb 16, 2021
Disable instapage buttons for a few seconds
View file.js
const buttonDelaySeconds = 5;
const selector = ".btn.url-link";
function run() {
var els = document.querySelectorAll(selector);
var origHrefs = [];
els.forEach(function (el) {
origHrefs.push(el.href);
el.style["pointer-events"] = "none";
el.style.opacity = 0.2;
View update-go.sh
#!/bin/bash
set -e
if [ -z "$1" ]
then
echo "Please provide a version number, like 1.13.5"
exit 1
fi
View place.go
package models
// Place represents a place of residence to be listed and filtered
type Place struct {
Name string
Region string
Location string
ContactName string
SquareFeet int
}
View keybase.md

Keybase proof

I hereby claim:

  • I am codegoalie on github.
  • I am codegoalie (https://keybase.io/codegoalie) on keybase.
  • I have a public key ASCBibAlr_5Q_k6LdB1S5BXOjqo4lV1rii6vI7g92shZago

To claim this, I am signing this object:

View start_story.sh
#!/bin/bash
# This script takes story ID and type then a branch subname.
# It will use goutrack to mark the story as in progress and create a new branch
# in the current directory off the current branch with the format:
# <type>/<ID>-<subname>
while [[ $# > 1 ]]
do
key="$1"
View gist:021ae9d832313a315419
### Keybase proof
I hereby claim:
* I am chrismar035 on github.
* I am chrismar035 (https://keybase.io/chrismar035) on keybase.
* I have a public key whose fingerprint is 1710 2A86 50B7 CD4C 6325 2B9B 81D4 F79F BDFA 7EAF
To claim this, I am signing this object:
@codegoalie
codegoalie / contacts.log
Created Jun 15, 2014
Logcat of Contacts App failure on CM 11 Nexus 5
View contacts.log
I/ActivityManager( 1119): START u0 {act=android.intent.action.VIEW dat=content://com.android.contacts/contacts/lookup/2746i2dab0ce008626dbc/263 flg=0x80000 cmp=com.android.contacts/.activities.ContactDetailActivity} from pid 30725
I/ContactLoader(30725): Registering content observer for content://com.android.contacts/contacts/lookup/2746i2dab0ce008626dbc/263
I/ActivityManager( 1119): Displayed com.android.contacts/.activities.ContactDetailActivity: +193ms
W/PhoneNumberFormatter(30658): Error type: NOT_A_NUMBER. The phone number supplied was null.
W/PhoneNumberFormatter(30658): at com.google.i18n.phonenumbers.PhoneNumberUtil.parseHelper(PhoneNumberUtil.java:2771)
W/PhoneNumberFormatter(30658): at com.google.i18n.phonenumbers.PhoneNumberUtil.parse(PhoneNumberUtil.java:2684)
W/PhoneNumberFormatter(30658): at com.google.i18n.phonenumbers.PhoneNumberUtil.parse(PhoneNumberUtil.java:2674)
W/PhoneNumberFormatter(30658): at org.whispersystems.textsecure.util.PhoneNumberFormatter.formatNumber(PhoneNumberFormatter.j
@codegoalie
codegoalie / decimal_divider.go
Created Jun 14, 2014
Go Concurrency Examples
View decimal_divider.go
package main
import (
"fmt"
)
func decimal_divide(numerator, denominator int, c chan int) {
// do long division "by hand"
for ; numerator != 0; numerator = numerator % denominator {
numerator = numerator * 10