I hereby claim:
- I am davekaro on github.
- I am davekaro (https://keybase.io/davekaro) on keybase.
- I have a public key whose fingerprint is C421 4D56 84D1 5A4B ACB1 EE96 3818 49BD 558A AAE1
To claim this, I am signing this object:
<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> |
require "securerandom" | |
response = SecureRandom.hex(100_000) | |
run lambda { |env| | |
[200, {"Content-Type" => "text/plain"}, [response.dup]] | |
} |
# Mostly copied from http://stackoverflow.com/questions/11057905 | |
class LiveReloadMiddleware < Rack::Proxy | |
def initialize(app) | |
@app = app | |
end | |
def call(env) | |
# call super if we want to proxy, otherwise just handle regularly via call | |
(proxy?(env) && super) || @app.call(env) | |
end |
I hereby claim:
To claim this, I am signing this object:
timeline = client.user_timeline(@user_name, { count: 200, include_entities: true }) | |
hashtag_list = timeline.map { |tweet| tweet.hashtags.collect(&:text) } | |
@hashtags = hashtag_list.uniq.map do |tag| | |
{ text: tag, | |
weight: hashtag_list.grep(tag).size, | |
link: { href: "https://twitter.com/search?q=%23#{tag}", target: '_blank', title: "#{tag}" } } | |
end | |
@hashtags = @hashtags.to_json |
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 |
require 'rubygems' | |
require 'mechanize' | |
require 'nokogiri' | |
require 'open-uri' | |
def build_url(html) | |
title_begin = html =~ /<title>/ | |
title_end = html =~ /<\/title>/ | |
# get the title - ignore the YouTube prefix |