Skip to content

Instantly share code, notes, and snippets.

@DorotejaMazej
DorotejaMazej / git-deployment.md
Created September 1, 2020 20:44 — forked from noelboss/git-deployment.md
Simple automated GIT Deployment using Hooks

Simple automated GIT Deployment using GIT Hooks

Here are the simple steps needed to create a deployment from your local GIT repository to a server based on this in-depth tutorial.

How it works

You are developing in a working-copy on your local machine, lets say on the master branch. Most of the time, people would push code to a remote server like github.com or gitlab.com and pull or export it to a production server. Or you use a service like deepl.io to act upon a Web-Hook that's triggered that service.

@DorotejaMazej
DorotejaMazej / 2_relationships.sql
Created February 20, 2017 00:01
web_2-lesson_correction
SELECT MAX(Invoice.Total)
FROM Invoice;
SELECT MIN(Invoice.Total)
FROM Invoice;
SELECT Invoice.BillingCity, COUNT(*) AS Invoice_num
FROM Invoice
GROUP BY Invoice.BillingCity
ORDER BY Invoice_num DESC;
SELECT MAX(Invoice.Total)
FROM Invoice;
SELECT MIN(Invoice.Total)
FROM Invoice;
SELECT COUNT(Track.TrackId)
FROM Track
JOIN MediaType ON Track.MediaTypeId=MediaType.MediaTypeId
WHERE MediaType.Name='Protected AAC audio file';
SELECT Name
FROM Artist;
SELECT *
FROM Invoice
WHERE BillingCountry = 'Germany';
SELECT COUNT(*)
AS AlbumId
FROM Album;
@DorotejaMazej
DorotejaMazej / scrape_Wikipedia_tables.py
Created December 9, 2016 11:35 — forked from wassname/scrape_Wikipedia_tables.py
Scrape a table from wikipedia using python. Allows for cells spanning multiple rows and/or columns. Outputs csv files for each table
# -*- coding: utf-8 -*-
"""
Scrape a table from wikipedia using python. Allows for cells spanning multiple rows and/or columns. Outputs csv files for
each table
"""
from bs4 import BeautifulSoup
import urllib2
import os
import codecs
a = int(raw_input("Select number between 1 and 100"))
for x in range(1,a):
if x%3 == 0 and x%5 ==0:
print("fizzbuzz")
if x%3 == 0:
print("fizz")
# -*- coding: utf-8 -*-
st_km = 5
pretvornik = 0.62137
st_milj = 0
while True:
st_km = int(raw_input("Pozdravljeni v programu, ki pretvarja kilometre v milje. Vnesite število kilometrov"))
st_milj = st_km * pretvornik
secret = 9
while True:
guess = int(raw_input("guess between 1 and 90: "))
if guess == secret:
print("You guessed")
break
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Sing in</title>
<link href="css/bootstrap.min.css" rel="stylesheet">
<link rel="stylesheet" href="path/to/font-awesome/css/font-awesome.min.css">
<link rel="stylesheet" href="style2.css">
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Fakebook</title>
<meta name="description" content="fakebook">
<meta name="keywords" content="fakebook, Doroteja Mazej">
<meta name="author" content="Doroteja Mazej">
<style>