Skip to content

Instantly share code, notes, and snippets.

View klementj's full-sized avatar
🤖

Klement Johansen klementj

🤖
  • AspIT
  • Copenhagen
View GitHub Profile
@klementj
klementj / devops_training.md
Last active May 26, 2019 22:25 — forked from ssmythe/devops_training.txt
Training materials for DevOps

====== Videos

DevOps

What is DevOps? by Rackspace - Really great introduction to DevOps https://www.youtube.com/watch?v=_I94-tJlovg

Sanjeev Sharma series on DevOps (great repetition to really get the DevOps concept)

@klementj
klementj / _fluid.scss
Last active April 9, 2018 11:19
SCSS partial for fluid-type
// Michael Riethmuller
//
// https://css-tricks.com/snippets/css/fluid-typography/
// https://www.youtube.com/watch?v=Wb5xDcUNq48
// https://www.youtube.com/watch?v=mAvQUIKtW_Y
// Example
// $min-screen:400px;
// $max-screen: 1280px;
// $min-font: 14px;
@klementj
klementj / Docker wordpress.md
Last active February 25, 2019 15:19
Docker wordpress + mysql + phpmyadmin commands

Quick docker setup Windows 10

https://docs.docker.com/engine/reference/commandline/cli/

docker run --name wpmysql -e MYSQL_ROOT_PASSWORD=secret-pw -d mysql:5.7
docker run --name wordpress --link wpmysql:mysql --volume /$PWD/wp-themes:/var/www/html/wp-content/themes --publish 8080:80 --detach wordpress
@klementj
klementj / GitHub-guide.md
Last active November 7, 2018 10:27
GitHub guide

Vejledning til GitHub

Vejledning til hvordan du får git på din computer, opretter dit første repository og hvilke kommandoer du oftes skal bruge i dit daglige work-flow, når du bruger git til versionsstyring af dine projekter.

Installation af git

Hvis du ikke før har arbejdet med git på din computer skal du gå ind på den officielle side til git for at downloade og efterfølgende installere git.

For at navigere rundt på din lokale computer ved at bruge Git Bash, skal du bruge UNIX kommandoer. Du kan se en liste over kommandoer her. Du skal primært bruge cd og ls

Opsætning af repository

Opret et nyt repository på GitHub.com og kopier link. Åben 'git bash' og clone (klone) dit nye repository ned på din computer.

@klementj
klementj / Elevprofiler_V31-M3-F2018.md
Last active May 15, 2018 07:56
V31-M3-F2018 elevprofiler
// Class: Defines the shape of a type of object. The shape for each instance.
class Book {
// Constructor: Properties that each instance are supposed to have.
constructor(slots) {
this.isbn = slots.isbn;
this.title = slots.title;
this.year = slots.year;
};
// Static Method: A static method call is made directly on the class and are not callable on instances of the class. Static methods are often used to create utility functions.
@klementj
klementj / BookES6+Spørgsmål.js
Created June 3, 2018 11:26
Exercise for book.js about data structures.
/**
* REFLESKTIONS- og EVALUERINGSopgave
*
* Fomål: Du skal få endnu bedre styr på koden og refletere over hvordan og hvorfor Book data sættes op i forskellige strukturer (datastrukturer).
* Tid: Du må maksimalt bruge tre lektioner (en halv dag) til opgaven.
*
* Du bestemmer selv hvordan du vil svare på opgaven. Du kan enten skrive dine svar under hvert spørgsmål eller skrive det ind i et Word dokument.
* Når du er færdig skal du sende din besvarelse til din lærer (KLJO) via mail, så vil jeg give dig feedback.
*
* Hjælp: Du kan finde mange af svarene ved at åbne programmet i din browser og bruge udviklerværktøjets console. Du kan fx kalde en metode eller property.
//https://www.reddit.com/r/learnjavascript/comments/9tyxni/any_benefit_to_using_async_await_vs_standard/e908nwx
export default {
URI: 'https://api.openweathermap.org',
getLocalWeather: async function(city=null, countryCode=null) {
try {
// fetch the API key from environment
const API_KEY = await fetch('http://localhost:8000')
.then(response=> response.json())
@klementj
klementj / movies.js
Created December 11, 2018 17:19
Array of movie objects as you'll get them from the server
const testMovies = [
{
"Title": "Blade Runner",
"Year": "1982",
"Genre": "Sci-Fi, Thriller",
"Plot": "A blade runner must pursue and terminate four replicants who stole a ship in space, and have returned to Earth to find their creator.",
"Poster": "https://m.media-amazon.com/images/M/MV5BNzQzMzJhZTEtOWM4NS00MTdhLTg0YjgtMjM4MDRkZjUwZDBlXkEyXkFqcGdeQXVyNjU0OTQ0OTY@._V1_SX300.jpg",
"imdbID": "tt0083658",
"Type": "movie"
},