Skip to content

Instantly share code, notes, and snippets.

View martinsp's full-sized avatar

Martins Polakovs martinsp

View GitHub Profile
@martinsp
martinsp / association-extension-failing.rb
Last active July 18, 2018 18:57
ActiveRecord assign_nested_attributes_for_collection_association bug
# frozen_string_literal: true
begin
require "bundler/inline"
rescue LoadError => e
$stderr.puts "Bundler version 1.10 or later is required. Please update your Bundler"
raise e
end
gemfile(true) do
@martinsp
martinsp / has_many_bug.rb
Last active June 29, 2017 14:08
Has many collection_singular_ids bug
begin
require "bundler/inline"
rescue LoadError => e
$stderr.puts "Bundler version 1.10 or later is required. Please update your Bundler"
raise e
end
gemfile(true) do
source "https://rubygems.org"
# Activate the gem you are reporting the issue against.
@martinsp
martinsp / arduino_atmega_8mhz.md
Created October 8, 2015 08:01
Bootloading ATmega 328 containing 16Mhz Arduino bootloader with 8Mhz Arduino bootloader

Instructions how to turn ATmega chip having bootloader for 16Mhz Arduino to bootloader for 8Mhz Arduino

  1. Alter boards.txt for Arduino IDE
##############################################################

xx.name=328 8mhz external
xx.upload.tool=avrdude
xx.upload.protocol=arduino

Howto build a rust compiler for the Raspberry Pi on Debian 7.1 (wheezy)

# additional information: http://stackoverflow.com/questions/19162072/installing-raspberry-pi-cross-compiler/19269715#19269715
sudo apt-get install git build-essential
test `uname -m` = x86_64 && sudo apt-get install ia32-libs
git clone https://github.com/raspberrypi/tools.git
export PATH=$PWD/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin:$PATH
git clone http://github.com/mozilla/rust.git
cd rust

./configure --target=arm-unknown-linux-gnueabihf