Skip to content

Instantly share code, notes, and snippets.

<div data-controller="multi-select">
<%= form.label(method, id: "#{id_base}__label", class: "funky-label") %>
<%# used as descriptive text for option buttons; if used within the button text itself, it ends up being read with the input name %>
<span id="<%= "#{id_base}__remove" %>" class="hidden">remove</span>
<ul id="<%= "#{id_base}__selected" %>" class="space-x-2 selected-options">
<template id="<%= "#{id_base}__selected-option-template" %>">
<li>
<%= form.hidden_field(method, multiple: true, value: nil) %>
<button class="space-x-1 btn-rounded" aria-describedby="<%= "#{id_base}__remove" %>">
<span class="combobox-remove-text"></span>
@davekaro
davekaro / gist:7313218
Last active December 27, 2015 10:39 — forked from ivanvanderbyl/gist:4222308
Upgrade Postgres from 9.2 to 9.3 on Ubuntu
sudo add-apt-repository ppa:pitti/postgresql
sudo apt-get update
sudo apt-get install postgresql-9.3 postgresql-server-dev-9.3 postgresql-contrib-9.3
sudo su -l postgres
service postgresql stop
/usr/lib/postgresql/9.3/bin/pg_upgrade -b /usr/lib/postgresql/9.2/bin -B /usr/lib/postgresql/9.3/bin -d /var/lib/postgresql/9.2/main/ -D /var/lib/postgresql/9.3/main/ -O "-c config_file=/etc/postgresql/9.3/main/postgresql.conf" -o "-c config_file=/etc/postgresql/9.2/main/postgresql.conf"
logout # logout postgresql back to previous user