This file contains hidden or 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 hidden or 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 hidden or 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
@echo off | |
::where do we store the messages | |
SET mailpath=c:\xampp\tmp\mail\ | |
if not exist %mailpath% mkdir %mailpath% | |
::create filename | |
echo %date:~0,11% | |
SET filename=%date:~11,4%-%date:~7,2%-%date:~3,2%_%hours%-%time:~3,2%-%time:~6,2%_%time:~9,2% |
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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
; path to your php_xdebug extension file | |
; download from https://xdebug.org/wizard.php | |
zend_extension="c:\xampp-php7\php\ext\php_xdebug-2.4.0-7.0-vc14.dll" | |
; disables profiler globally | |
xdebug.profiler_enable = 0 | |
; allows enabling it selectively with request parameter "XDEBUG_PROFILE" | |
xdebug.profiler_enable_trigger = 1 | |
; directory to output profiler files to | |
xdebug.profiler_output_dir = "C:\xampp-php7\tmp" | |
; profiler file name (with request uri and timestamp) |
This file contains hidden or 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" |
This file contains hidden or 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
USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND | |
elastics 20 0 9005m 2,6g 34m S 6,0 33,0 2779:33 java | |
logstash 39 19 1059m 409m 6332 S 3,9 5,1 3352:36 java | |
root 20 0 259m 41m 3392 S 0,1 0,5 4:51.60 salt-minion | |
root 20 0 737m 126m 3792 S 0,1 1,6 28:26.23 node |