Skip to content

Instantly share code, notes, and snippets.

View avr-rust-bug-57.patch
Index: lib/Target/AVR/AVRISelLowering.cpp
===================================================================
--- lib/Target/AVR/AVRISelLowering.cpp (revision 325378)
+++ lib/Target/AVR/AVRISelLowering.cpp (working copy)
@@ -867,10 +867,11 @@
/// For each argument in a function store the number of pieces it is composed
/// of.
-static void parseFunctionArgs(const Function *F, const DataLayout *TD,
+static void parseFunctionArgs(const SmallVectorImpl<ISD::InputArg> &Ins,
@olivierlacan
olivierlacan / migrate_postgresql_database.md
Last active Mar 25, 2021
How to migrate a Homebrew-installed PostgreSQL database to a new major version (9.3 to 9.4) on OS X. See upgraded version of this guide: http://olivierlacan.com/posts/migrating-homebrew-postgres-to-a-new-version/
View migrate_postgresql_database.md

This guide assumes that you recently run brew upgrade postgresql and discovered to your dismay that you accidentally bumped from one major version to another: say 9.3.x to 9.4.x. Yes, that is a major version bump in PG land.

First let's check something.

brew info postgresql

The top of what gets printed as a result is the most important:

@shunchu
shunchu / convert-seconds-into-hh-mm-ss-in-ruby.rb
Created Jul 25, 2012
Convert seconds into HH:MM:SS in Ruby
View convert-seconds-into-hh-mm-ss-in-ruby.rb
t = 236 # seconds
Time.at(t).utc.strftime("%H:%M:%S")
=> "00:03:56"
# Reference
# http://stackoverflow.com/questions/3963930/ruby-rails-how-to-convert-seconds-to-time