Skip to content

Instantly share code, notes, and snippets.

Avatar

Ben Radler Lordnibbler

View GitHub Profile
View gist:88d966dc2df469527d90f07d5cf71fcb
### 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:
View how_to_blheli_mac_osx.md

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
View alfred_snippets.txt
# <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 Aug 6, 2015
Hubot Giphy Coffeescript
View giphy.coffee
# 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'
View gist:1377926df88597b82b53
$ grep 29 file.log | cut -d , -f 4 |sort |uniq -c |sort -nr
View log_example.json
{
"event": "serverfault",
"code": 5234,
"reason": "Disk full"
}
@Lordnibbler
Lordnibbler / pull-request-template.md
Last active Jul 5, 2020
Sample Pull Request Template
View pull-request-template.md

Status

READY/IN DEVELOPMENT/HOLD

Migrations

YES | NO

Description

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

Related PRs

View rake_routes.rb
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
View foo.rb
puts 'Start'
numbers = []
def do_it_later(&b)
b
end
5.times do |i|
puts "adding: #{i}"
View domain_constraint.rb
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
You can’t perform that action at this time.