Skip to content

Instantly share code, notes, and snippets.

  • terminal / command line basics
    • basic navigation: pwd, ls, cd
    • special paths: . / .. / ~ / -
    • autocompletion
    • command history (arrow keys, Ctrl+R)
    • executing programs (e.g. node, git, ...)
    • quitting programs
    • copying / pasting in the terminal
    • managing files and directories: mkdir, mv, cp, rm
  • development environment: VS Code
// Welcome to Launchpad!
// Log in to edit and save pads, run queries in GraphiQL on the right.
// Click "Download" above to get a zip with a standalone Node.js server.
// See docs and examples at https://github.com/apollographql/awesome-launchpad
// graphql-tools combines a schema string with resolvers.
import { makeExecutableSchema } from 'graphql-tools';
// Construct a schema, using GraphQL schema language
try:
number_one = float(number_one)
number_two = float(number_two)
except ValueError:
return self.write("You need to enter numbers!")
if operator == "addition":
result = number_one + number_two
elif operator == "subtraction":
result = number_one - number_two
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Hairdresser Hans</title>
<!-- Latest compiled and minified CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
<!-- Optional theme -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap-theme.min.css" integrity="sha384-rHyoN1iRsVXV4nD0JutlnGaslCJuC7uwjduW9SVrLvRYooPp2bWYgmgJQIXwl/Sp" crossorigin="anonymous">
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>CSS Experimente</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<div class="container">
<h1 class="important">
@marko-knoebl
marko-knoebl / mayaOnUbuntu.sh
Last active October 31, 2016 12:13 — forked from z3ntu/mayaOnUbuntu.sh
Shell script for installing Maya 2016 SP4. Tested on Ubuntu 15.10
#!/bin/bash
# Heith Seewald 2012
# Garoe Dorta 2015
# Luca Weiss 2015
# Also based on https://gist.github.com/MichaelLawton/ee27bf4a0f591bed19ac
# Feel free to extend/modify to meet your needs.
#### Lets run a few checks to make sure things work as expected.
#Make sure we’re running with root permissions.
if [ `whoami` != root ]; then
menu=[]
while True:
meal=raw_input("Welche Speise wollen Sie dem Menu hinzufuegen: ")
price=raw_input("Was kostet diese Speise: ")
new_meal={"Speise":meal, "Preis":price}
menu.append(new_meal)
abbruch=raw_input("Bist du fertig mit deinen Eintraegen? (J) ")
if abbruch.lower()=="j":
break
@marko-knoebl
marko-knoebl / item_prices.py
Created May 27, 2016 19:34
Das item_prices - Skript, das wir am Ende der Lektion erstellt haben
item_prices = {'milk': 2.30, 'bread': 1.10, 'water': 0.50}
item = raw_input('Choose an item:')
if item in item_prices:
print 'price:', item_prices[item]
else:
print 'item not available!'
@marko-knoebl
marko-knoebl / calculator.py
Created May 27, 2016 19:29
Der "Calculator", den wir in der Stunde vom 27.5. erstellt haben (basierend auf Salehs Lösung)
print "This is a simple calculator"
# wir definieren unsere eigene "Funktion",
# die wiederholt ausgefuehrt werden kann.
# Vorteil: ich muss diesen Code nur einmal Schreiben und kann ihn zweimal ausfuehren
def get_number():
# die funcktion fragt den Benutzer nach einer
# Zahl und liefert diese ans Programm zurueck.
# Den Code in der Funktion musst du nicht unbedingt ganz verstehen.
try: