Skip to content

Instantly share code, notes, and snippets.

mikecrittenden / new_gist_file
Last active Mar 30, 2020
Search all git commit diffs for a specific string - both regex and non-regex versions
View new_gist_file
git rev-list --all | xargs git grep '<YOUR REGEX>' # regex
git rev-list --all | xargs git grep -F '<YOUR STRING>' # non-regex
View MacBook Pro Wifi on Fedora

The current kernel/drivers of Fedora 24 do not support the Wifi chip used on my Mac Book Pro. Proprietary Broadcom drivers are packaged and available in the rpmfusion repo.

Verify that your card is a Broadcom using: lspci -vnn -d 14e4:

Sample output:

02:00.0 Network controller [0280]: Broadcom Corporation BCM4360 802.11ac Wireless Network Adapter [14e4:43a0] (rev 03)


Install the rpmfusion repo, note only "nonfree" is required, as the Broadcom Driver is proprietry:

class EspressoTextInputLayoutUtils{
* Use this method to find the EditText within the TextInputLayout. Useful for typing into the TextInputLayout
public static ViewInteraction onEditTextWithinTilWithId(@IdRes int textInputLayoutId) {
//Note, if you have specified an ID for the EditText that you place inside
//the TextInputLayout, use that instead - i.e, onView(withId(;
return onView(allOf(isDescendantOfA(withId(textInputLayoutId)), isAssignableFrom(EditText.class)));
manishtpatel / main.go
Last active Sep 3, 2021
GoLang Encrypt string to base64 and vice versa using AES encryption.
View main.go
package main
import (
andelf / smtp_login_auth.go
Created Mar 8, 2013
golang net/smtp SMTP AUTH LOGIN Auth Handler
View smtp_login_auth.go
// MIT license (c) andelf 2013
import (
type loginAuth struct {
username, password string
andelf / sendMail.go
Last active Aug 15, 2021
golang send mail net/smtp SMTP
View sendMail.go
package main
import (
malarkey / Contract Killer
Last active Oct 27, 2021
The latest version of my ‘killer contract’ for web designers and developers
View Contract Killer

When times get tough and people get nasty, you’ll need more than a killer smile. You’ll need a killer contract.

Used by 1000s of designers and developers Clarify what’s expected on both sides Helps build great relationships between you and your clients Plain and simple, no legal jargon Customisable to suit your business Used on countless web projects since 2008


alexisrobert / webserver.go
Created May 20, 2011
Tiny web server in Go for sharing a folder
View webserver.go
/* Tiny web server in Golang for sharing a folder
Copyright (c) 2010-2014 Alexis ROBERT <>
Contains some code from Golang's http.ServeFile method, and
uses lighttpd's directory listing HTML template. */
package main
import "net/http"
import "net/url"
View ipfw bandwidth
# Use ipfw to throttle bandwidth.
# usage:
# ./ # Throttle at default (60KB/s)
# ./ 5 # Throttle at custom speed (5KB/s)
# ./ off # Turn throttling off
# flush rules
ipfw del pipe 1