Turns Processing code into JavaScript
This file contains hidden or 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
sudo chown -R $(whoami) /Library/Ruby/Gems |
This file contains hidden or 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
# Meet the Beatles: | |
beatles = [ | |
{"name": "John Lennon", "birth_year": 1940, "death_year": 1980, "instrument": "piano"}, | |
{"name": "Paul McCartney", "birth_year": 1942, "death_year": None, "instrument": "bass"}, | |
{"name": "George Harrison", "birth_year": 1943, "death_year": 2001, "instrument": "guitar"}, | |
{"name": "Ringo Starr", "birth_year": 1940, "death_year": None, "instrument": "drums"} | |
] | |
# Use the `beatles` list above to answer the following questions: |
This file contains hidden or 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
# If you come from bash you might have to change your $PATH. | |
# export PATH=$HOME/bin:/usr/local/bin:$PATH | |
# Path to your oh-my-zsh installation. | |
export ZSH="/Users/alanrussell/.oh-my-zsh" | |
# Set name of the theme to load. Optionally, if you set this to "random" | |
# it'll load a random theme each time that oh-my-zsh is loaded. | |
# See https://github.com/robbyrussell/oh-my-zsh/wiki/Themes | |
ZSH_THEME="robbyrussell" |
This file contains hidden or 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
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>AlternateMouseScroll</key> | |
<true/> | |
<key>AppleAntiAliasingThreshold</key> | |
<integer>1</integer> | |
<key>AppleScrollAnimationEnabled</key> | |
<integer>0</integer> |
This file contains hidden or 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 'net/http' | |
require 'json' | |
uri = URI('https://restcountries.eu/rest/v2/name/united') | |
req = Net::HTTP::Get.new uri.path | |
res = Net::HTTP.start(uri.host, uri.port, use_ssl: uri.scheme == 'https') do |http| | |
http.request(req) | |
end | |
countries = JSON.parse(res.body) |
Your task is to build a UI around the REST Countries API.
The UI must do the following:
- Allow the user to choose a region of the world (Asia, Europe, Oceania, etc)
- Once a region is chosen, allow the user to select a country within that region (e.g. if the user chooses Europe, they can then choose France, Germany and others, but not New Zealand)
- Once the user chooses a country, display the following information about that country:
- As a page title, the country’s common name and flag, e.g. Germany 🇩🇪
OlderNewer