This is the code discussed in class, minus the images. You can check the final result online at Forge, where we've uploaded it:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'flickr_fu' | |
require 'httparty' | |
require 'pry' | |
DIR = "./photos" | |
MAXTHREADS = 30 | |
# Prepare the downloadin' | |
`mkdir -p #{DIR}` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Thread count control | |
MAXTHREADS = 30 | |
# This is the collection of data you need to process with threads | |
collection = [] | |
# A nice array to store your thread objects | |
threads = [] | |
Make sure to check out the main reading in compass, it will clarify a lot of what's happening in the code: https://rbc-corp.lighthouselabs.ca/days/w2d2/activities/44
Save both the flex.css
and flex.html
to the same folder in your computer and experiment!
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// We've followed documentation links and played with the example code a bit: | |
// Start here: https://cloud.google.com/speech | |
// If you need an audio editor, try Audacity: | |
// https://www.audacityteam.org | |
// | |
// usage: node voice-recog.js soundfile.flac en-US | |
// | |
// The second argument is the language code (e.g. en-US, pt-BR, fr-CA...) | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'atom-text-editor.vim-mode-plus': | |
'ctrl-c': 'core:copy' | |
'ctrl-x': 'core:cut' | |
'ctrl-v': 'core:paste' | |
'atom-text-editor.vim-mode-plus.insert-mode': | |
'ctrl-c': 'core:copy' | |
'ctrl-x': 'core:cut' | |
'ctrl-v': 'core:paste' |
Is you attempt to do a bin/rails db:setup
or something similar and it complains like this:
PG::InvalidParameterValue: ERROR: encoding "UTF8" does not match locale "en_US"
DETAIL: The chosen LC_CTYPE setting requires encoding "LATIN1".
Run these commands in your Vagrant box:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Git prompt goodness, adapted and curated from several sources. | |
# Just add this code to your .bash_profile/.bashrc to use it. | |
# | |
# It looks like this: | |
# ~/my/folder(my-git-branch)$ | |
# | |
# There are variations if there are untracked files (a + will appear), uncommited changes | |
# (branch colour turns yellow) and if you need to pull/push (arrows will appear). | |
function parse_git_branch { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# wav1644.sh - Converts .wav files to 16bits/44khz (CD quality) | |
# Many iPad audio apps need this, and it's a good size/quality ratio for | |
# uncompressed audio anyway. Fuck Neil Young and other clueless audiophiles. | |
# Download this to somewhere in your $PATH and make it exectutable with | |
# chmod a+x wav1644.sh | |
# WAV conversion function - uses ffmpeg | |
function convertwav { |
NewerOlder