Skip to content

Instantly share code, notes, and snippets.

View Lordnibbler's full-sized avatar

Ben Radler Lordnibbler

View GitHub Profile
### Keybase proof
I hereby claim:
* I am lordnibbler on github.
* I am benradler (https://keybase.io/benradler) on keybase.
* I have a public key ASAKKxWxSHzl2ssgBqohxuLfxqzlAsxcUb9mp-zxRXExGwo
To claim this, I am signing this object:

How to use BLHeli Suite on Mac OS X

  1. download & install winebottler

  2. save list of devices connected to computer

ls /dev/* > /tmp/usbtmp1
  1. plug in quadcopter over USB
@Lordnibbler
Lordnibbler / alfred_snippets.txt
Created August 15, 2015 08:06
Alfred Snippets
# <name> / <snippet>
# dnsmasq
edit dnsmasq.conf / vi /usr/local/etc/dnsmasq.conf
kill dnsmasq / sudo killall -9 dnsmasq
load dnsmasq / sudo launchctl load /Library/LaunchDaemons/homebrew.mxcl.dnsmasq.plist
unload dnsmasq / sudo launchctl unload /Library/LaunchDaemons/homebrew.mxcl.dnsmasq.plist
flush DNS caches / sudo discoveryutil udnsflushcaches
# git/hub
@Lordnibbler
Lordnibbler / giphy.coffee
Created August 6, 2015 21:43
Hubot Giphy Coffeescript
# Commands:
# giphy <term> - Returns a randomly selected gif from a search of the giphy api for <term>
giphy =
api_key: process.env.HUBOT_GIPHY_API_KEY
api_url: 'http://api.giphy.com/v1'
search: (msg, q, callback) ->
endpoint = '/gifs/search'
$ grep 29 file.log | cut -d , -f 4 |sort |uniq -c |sort -nr
{
"event": "serverfault",
"code": 5234,
"reason": "Disk full"
}
@Lordnibbler
Lordnibbler / pull-request-template.md
Last active October 20, 2022 17:32
Sample Pull Request Template

Status

READY/IN DEVELOPMENT/HOLD

Migrations

YES | NO

Description

A few sentences describing the overall goals of the pull request's commits.

Related PRs

create_index GET /messages/support/warranty(.:format) messages#index │·
GET /messages/support/register(.:format) messages#index │·
GET /messages/support/exchange(.:format) messages#index │·
GET /messages/support/contact-us(.:format) messages#index │·
POST /messages(.:format) messages#create
puts 'Start'
numbers = []
def do_it_later(&b)
b
end
5.times do |i|
puts "adding: #{i}"
class DomainConstraint
def initialize(domain)
@domains = [domain].flatten
end
def matches?(request)
request.subdomain.present? ? domain_to_match = request.subdomain + "." + request.domain : domain_to_match = request.domain
@domains.include? domain_to_match
end
end