Skip to content

Instantly share code, notes, and snippets.

View Lordnibbler's full-sized avatar

Ben Radler Lordnibbler

View GitHub Profile

Cam settings

Before you do anything, perform a factory reset.

Setup

Lens: Manual

White bal: AT1

@lazd
lazd / Falcon 185 Baseline Setup - Luxfloat.txt
Last active May 27, 2016 20:59
Falcon 185 Baseline Setup - Luxfloat
# features
feature -MOTOR_STOP
feature VBAT
feature RX_SERIAL
feature SOFTSERIAL
feature FAILSAFE
feature TELEMETRY
feature ONESHOT125
feature BLACKBOX
@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

@leemour
leemour / Guardfile
Created February 19, 2014 18:23
Guard was slow now is fast with ignore
ignore([%r{^bin/*}, %r{^config/*}, %r{^db/*}, %r{^lib/*}, %r{^log/*}, %r{^public/*}, %r{^tmp/*}])
guard :rspec, :spec_paths => ['spec/models', 'spec/lib'],
cmd: 'spring rspec -f doc --tag ~@slow',
# all_after_pass: true,
all_on_start: false,
failed_mode: :keep do
watch(%r{^spec/.+_spec\.rb$})
watch(%r{^lib/(.+)\.rb$}) { |m| "spec/lib/#{m[1]}_spec.rb" }
watch('spec/spec_helper.rb') { "spec" }
@schickling
schickling / Rakefile
Last active January 31, 2024 23:00
Activerecord without Rails
require "active_record"
namespace :db do
db_config = YAML::load(File.open('config/database.yml'))
db_config_admin = db_config.merge({'database' => 'postgres', 'schema_search_path' => 'public'})
desc "Create the database"
task :create do
ActiveRecord::Base.establish_connection(db_config_admin)
class Spree::Calculator::Shipping::QualifiedFreeShipping < Spree::Calculator
preference :minpurchase, :decimal, :default => 0
attr_accessible :preferred_minpurchase
def self.description
Spree.t(:qualified_free_shipping)
end
def compute(package)
return 0
@mwunsch
mwunsch / emoji_image_replace.js
Last active August 13, 2023 21:44
Detect emoji unicode on a page, replace it with images (supplied by GitHub, for now). Goes great in your ~/.js
/**
*
* Here's a thing that will look through all the text nodes of a document, and
* upon encountering an emoji codepoint, will replace it with an image.
* For now, those images are pulled from GitHub, which isn't very nice, so I
* need to find a more suitable host.
*
* Much of this code was gleaned from staring at the minified GitHub JS.
*
* Copyright (c) 2013 Mark Wunsch. Licensed under the MIT License.
@jcowhigjr
jcowhigjr / spree-api-rest-examples.md
Created November 5, 2012 23:58
Spree API REST Examples

Products

index of products 25 first

curl -i -H "X-Spree-Token: YOUR_TOKEN_ID" http://0.0.0.0:3000/api/products.json

Show a product

curl -i -H "X-Spree-Token: YOUR_TOKEN_ID" http://0.0.0.0:3000/api/products/706676762.json

Modify a product

curl -i -X PUT -H "X-Spree-Token: YOUR_TOKEN_ID" -d "product[name]=Headphones" http://0.0.0.0:3000/api/products/706676762.json

@akiatoji
akiatoji / Run local Gem doc server.md
Last active October 6, 2015 19:57
Setting up Yard server as rack app in Nginx

Run Yard server to serve Gem docs

Based on good work found at http://goo.gl/bKjJe

If you have Nginx running, you can run Yard as a rack app to serve docs for locally installed Gem.

  1. Create a directory to host Rack app. Install yard gem
mkdir -p ~/Dropbox/yard/public
@jboner
jboner / latency.txt
Last active May 14, 2024 16:01
Latency Numbers Every Programmer Should Know
Latency Comparison Numbers (~2012)
----------------------------------
L1 cache reference 0.5 ns
Branch mispredict 5 ns
L2 cache reference 7 ns 14x L1 cache
Mutex lock/unlock 25 ns
Main memory reference 100 ns 20x L2 cache, 200x L1 cache
Compress 1K bytes with Zippy 3,000 ns 3 us
Send 1K bytes over 1 Gbps network 10,000 ns 10 us
Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD