Skip to content

Instantly share code, notes, and snippets.

View LimeBlast's full-sized avatar
📈
Setting my goals for 2019

Daniel Hollands LimeBlast

📈
Setting my goals for 2019
View GitHub Profile
NoMethodError: undefined method `trace_id' for Marginalia::Comment:Module
/app/vendor/bundle/ruby/2.5.0/gems/marginalia-1.10.1/lib/marginalia/comment.rb:25:in `block in construct_comment'
/app/vendor/bundle/ruby/2.5.0/gems/marginalia-1.10.1/lib/marginalia/comment.rb:24:in `each'
/app/vendor/bundle/ruby/2.5.0/gems/marginalia-1.10.1/lib/marginalia/comment.rb:24:in `construct_comment'
/app/vendor/bundle/ruby/2.5.0/gems/marginalia-1.10.1/lib/marginalia.rb:50:in `annotate_sql'
/app/vendor/bundle/ruby/2.5.0/gems/marginalia-1.10.1/lib/marginalia.rb:71:in `execute_with_marginalia'
/app/vendor/bundle/ruby/2.5.0/gems/activerecord-4.2.11.19/lib/active_record/connection_adapters/postgresql/schema_statements.rb:286:in `client_min_messages='
/app/vendor/bundle/ruby/2.5.0/gems/activerecord-4.2.11.19/lib/active_record/connection_adapters/postgresql_adapter.rb:673:in `configure_connection'
/app/vendor/bundle/ruby/2.5.0/gems/activerecord-4.2.11.19/lib/active_record
/* Include the HCWS2812 library */
#include "HCWS2812.h"
/* Create an instance of the library */
HCWS2812 HCWS2812;
void setup()
{
/* Set the R,G,B background colours to zero */
HCWS2812.SetBG(55, 55, 55);
@LimeBlast
LimeBlast / 01-install.md
Last active April 2, 2016 15:39
Steps to set-up a fresh Raspberry Pi
#!/usr/bin/env ruby
$:.unshift(File.expand_path('../../lib', __FILE__))
require 'ws2812'
def display(array, colours)
$hat.clear false
array.each_with_index do |row, x|
row.each_with_index do |value, y|
$hat[x, y] = colours[value]
end
#!/usr/bin/env ruby
$:.unshift(File.expand_path('../../lib', __FILE__))
require 'ws2812'
# Init
$hat = Ws2812::UnicornHAT.new
$hat.rotation = 90
$hat.clear
l = Ws2812::Color.new(220, 220, 220)
@LimeBlast
LimeBlast / instructions.md
Last active October 5, 2021 01:46
Configuring the TV Service on Raspberry Pi

Taken from Raspberry Pi 2 User Guide by Vilros

If you connect your Pi to a television using an HDMI cable, Raspbian automatically selects a screen size that it decides will be the best for your setup. However, this is not always the highest resolution.

The configuration setting that controls how Raspbian selects the screen size is in the file /boot/config.txt and you can adjust this setting with a text editor:

  1. On the Application Launcher, click LXTerminal.

  2. Type the following command and then press Enter:

@LimeBlast
LimeBlast / install_ruby_rpi.sh
Created February 5, 2016 20:54 — forked from blacktm/install_ruby_rpi.sh
A Bash script to install Ruby 2.3 on the Raspberry Pi (Raspbian)
#!/bin/bash
# -----------------------------------------------------------------------
# Installs Ruby 2.3 using rbenv/ruby-build on the Raspberry Pi (Raspbian)
#
# Run from the web:
# bash <(curl -s raw_script_url_here)
# -----------------------------------------------------------------------
# Set up variables
@LimeBlast
LimeBlast / rebase.md
Last active November 5, 2015 16:26
How to rebase a branch into master
  • git checkout master
  • git pull
  • git checkout <branch>
  • git rebase master
  • git push --force
  • git checkout master
  • git merge --no-ff
@LimeBlast
LimeBlast / spec_helper.rb
Last active December 4, 2015 10:24
change the config on the rspec backtrace display to ignore the /gems/ folder
RSpec.configure do |config|
...
# changes the config on the backtrace display to ignore the /gems/ folder
config.backtrace_exclusion_patterns.push(/gems/)
...
end
@LimeBlast
LimeBlast / keybase.md
Created April 30, 2015 13:47
keybase.md

Keybase proof

I hereby claim:

  • I am limeblast on github.
  • I am limeblast (https://keybase.io/limeblast) on keybase.
  • I have a public key whose fingerprint is C50A 94E2 29FC 7919 E7DA A631 0CEC E5EC BC74 0642

To claim this, I am signing this object: