git config --list
$ git config --global user.name "[name]"
$ git config --global user.email "[email address]"
-- MAIN INNODB TABLE FOR ARTICLES | |
CREATE TABLE `article` ( | |
`id` SMALLINT(5) UNSIGNED NOT NULL AUTO_INCREMENT, | |
`title` VARCHAR(50) NOT NULL, | |
`abstract` TEXT NOT NULL, | |
`content` MEDIUMTEXT NOT NULL, | |
`publish_date` DATETIME NULL DEFAULT NULL, | |
PRIMARY KEY (`id`) | |
) | |
COLLATE='utf8_general_ci' |
# if not running interactively, don't do anything | |
[ -z "$PS1" ] && return | |
# Detect platform | |
platform='unknown' | |
unamestr=`uname` | |
if [[ "$unamestr" == 'Linux' ]]; then | |
platform='linux' | |
elif [[ "$unamestr" == 'FreeBSD' ]]; then | |
platform='freebsd' |
<?php | |
/* | |
Objectives: | |
- Create PHP script that will translate input data to expected output from example below. | |
- Calculate time complexity of your script | |
bonus: Implement solution that will not use pass-by-reference and will not use objects | |
*/ | |
$input = [ | |
'A' => 1, |
<style type="text/css"> | |
#canvas { | |
/*background-color: red;*/ | |
position: absolute; | |
top: 0; | |
left: 0; | |
cursor: pointer; | |
/*pointer-events: none;*/ | |
} | |
</style> |
import re | |
summary = '[application-package-1.234] bug fixed' | |
res = re.match('\[(?P<pkg>(?P<pkg_name>[a-zA-Z\-]+)-(?P<pkg_ver>[0-9](\.[\.0-9]+)?))\] ?(?P<desc>.+)', summary) | |
print res.groupdict() |
import random | |
def roll2d6(): | |
res = random.randint(1, 6) + random.randint(1, 6) | |
while res <= 2 and random.randint(1, 6) <= 3: | |
res -= 1 | |
while res >= 12 and random.randint(1, 6) >= 4: | |
res += 1 | |
return res |
import aiohttp | |
import asyncio | |
url = 'https://httpbin.org/get' | |
class HttpClient: | |
def __init__(self): | |
self.session = aiohttp.ClientSession() |
{ | |
"basics": { | |
"name": "Jakub Tesárek", | |
"label": "Software Engineer", | |
"picture": "https://tesarek.me/media/profile.png", | |
"email": "[email protected]", | |
"phone": "+420 721812945", | |
"website": "https://tesarek.me", | |
"summary": "I am software engineer with more than 9 years of experience. I learn fast and in my career I adopted many different technologies a programming languages - I started as a PHP web developer. Currently I'm designing and programming cloud applications in Python using AWS.", | |
"location": { |