This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@media screen { | |
.page { | |
background: white; | |
width: 18cm; | |
height: 27.7cm; | |
display: block; | |
margin: 0 auto; | |
margin-bottom: 0.5cm; | |
box-shadow: 0 0 0.5cm rgba(0, 0, 0, 0.5); | |
padding: 1cm 1.5cm; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
λ make serve | |
make[1]: Entering directory `W:/www/projects/flexproject' | |
/usr/bin/sh: make: command not found | |
make[1]: *** [serve_as_sf] Error 127 | |
make[1]: Leaving directory `W:/www/projects/flexproject' | |
make: *** [serve] Error 2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import socket | |
def resolve(hostname): | |
return socket.gethostbyname(hostname) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// v $page může být cokoli, nejen "kontakt" nebo nic. Takže potřebujeme zkontrolovat, že nám tam nepropadne něco co nechceme. | |
if (isset($_GET['page'])) { | |
$page = $_GET['page']; | |
} else { | |
$page = 'hlavni'; | |
} | |
// uděláme pole se seznamem povolených hodnot |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$pdoOptions = [ | |
PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION, | |
PDO::MYSQL_ATTR_INIT_COMMAND => "SET NAMES utf8" | |
]; | |
$pdo = new PDO('mysql:host=127.0.0.1;dbname=blog', 'root', '', $pdoOptions); | |
$statement = $pdo->prepare("SELECT * FROM posts"); | |
$statement->execute(); | |
$posts = $statement->fetchAll(PDO::FETCH_ASSOC); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#set($NameLenght = $NAME.length() - 5) | |
#set($ClassName = $NAME.substring(0, $NameLenght)) | |
#set($TableName = $ClassName.toLowerCase()) | |
#set($TablePrefix = $Namespace.toLowerCase()) | |
#set($NAMESPACE = $Namespace) | |
#set($TYPE_TAG = '@var') | |
#set($TYPE_HINT = 'string') | |
<?php | |
namespace ${Namespace}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
curl -L https://bootstrap.saltstack.com -o bootstrap_salt.sh | |
sudo sh bootstrap_salt.sh | |
echo "file_client: local" >> /etc/salt/minion | |
apt-get install python-git | |
apt-get install software-properties-common |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
body { | |
background-color: red !important; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/bash | |
grep http /etc/salt/minion.d/settings.conf | cut -c6- | xargs -n1 git clone | |
find /home/tomas/ -type d -name "*formula" -exec git --git-dir={}/.git --work-tree={} pull origin master \; | |
find /home/tomas/ -type d -name "*formula" -exec sh -c "git --git-dir={}/.git --work-tree={} archive master | tar -x --strip-components 0 -C /srv/salt/" \; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[alias] | |
; creates timestamped branch rst-XXXXX and pushes it to default remote (origin) | |
rst = "!rst() { export tmpBranch=rst-$(date +%s) && git add -A && git checkout -b $tmpBranch && git commit -m 'WIP remote stash' && git push --set-upstream origin $tmpBranch; }; rst" |