Skip to content

Instantly share code, notes, and snippets.

View superbrothers's full-sized avatar
🌏
Working from the earth

Kazuki Suda superbrothers

🌏
Working from the earth
View GitHub Profile
@superbrothers
superbrothers / kubecon_curl.sh
Last active December 11, 2017 04:52 — forked from hobbsh/kubecon_curl.sh
Download Kubecon Austin 2017 presentations from Sched
#!/bin/bash
mkdir -p kubecon_files
DAYS=("2017-12-06" "2017-12-07" "2017-12-08")
for DAY in "${DAYS[@]}"; do
#Super shitty pipefest because of grep matched groups sadness
LINKS=($(curl https://kccncna17.sched.com/${DAY}/overview | grep -oEi "f='(.*)' cl" | cut -d\' -f 2 | tr '\n' ' '))
for LINK in "${LINKS[@]}"; do
echo "Requesting https://kccncna17.sched.com/${LINK}"
# Para salvar a altura e largura das imagens enviadas pelo plugin paperclip, utilize o callback abaixo
#
# class Document < ActiveRecord::Base
#
# has_attached_file :document, :styles => { :medium => "300x300>" }
#
# before_save :save_dimensions
#
# def save_dimensions
# if document.image?
FactoryGirl.define do
factory :application do
attachment :sample, "public/samples/sample.doc", "application/msword"
end
end