Skip to content

Instantly share code, notes, and snippets.

View ajrussellaudio's full-sized avatar
👋
Hiya

Alan Russell ajrussellaudio

👋
Hiya
View GitHub Profile

Orri Front End Developer Tech Test

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 🇩🇪

Java notes

Here I am, taking some awesome notes about Java:

public void sayHello (String name) {
    System.out.println(String.format("Hello, %s", name));
}
@ajrussellaudio
ajrussellaudio / request.rb
Created January 16, 2019 14:50
Doing a request in Ruby
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)
<?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>
# 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"
# 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:
@ajrussellaudio
ajrussellaudio / Fix_gem_install_permissions.txt
Last active March 27, 2018 14:15
Fixing `gem install` permissions
sudo chown -R $(whoami) /Library/Ruby/Gems

JS Record Store

Learning Objectives

  • Implement an OO JS program using the 'new' keyword
  • Practice adding methods to objects
  • Using JS data structures and loops
  • Practice building a TDD program from scratch

Requirements

"Hey Alan..."

"I already commited my Node.js project, but I forgot to add node_modules to a gitignore. How fucked am I??"

It's cool, don't panic. First make your gitignore file:

$ touch .gitignore