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
# based on https://susi.dev/dev-env-2020#5-use-systemd-hack-to-use-snap-optional-be-careful | |
# in windows | |
& 'C:\Program Files\VcXsrv\vcxsrv.exe' :0 -multiwindow -wgl -ac -silent-dup-error | |
# add firewall rule | |
netsh advfirewall firewall add rule name="XServer" dir=in program="C:\program files\vcxsrv\vcxsrv.exe" protocol=TCP localport=6000 action=allow profile=private remoteip=localsubnet | |
# in ubuntu | |
sudo apt-get update && sudo apt-get install -yqq daemonize dbus-user-session fontconfig |
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 | |
/* my day code */ | |
foreach ($minuteOfMyLife as $now => $whereAmI) { | |
if ($whereAmI == 'atHome') { | |
look_after_Honza(); | |
} elseif ($whereAmI == 'atWork') { | |
code(); | |
} else { | |
ride_my_bike(); | |
} |
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 | |
$tables_views = array_merge((array) $_POST["tables"], (array) $_POST["views"]); | |
if ($tables_views && !$error && !$_POST["search"]) { | |
$result = true; | |
$message = ""; | |
if ($jush == "sql" && $_POST["tables"] && count($_POST["tables"]) > 1 && ($_POST["drop"] || $_POST["truncate"] || $_POST["copy"])) { | |
queries("SET foreign_key_checks = 0"); // allows to truncate or drop several tables at once | |
} |
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 | |
# usage: rebase-to-moved.sh my-branch | |
# will create tag backup of current branch and rebase it on a moved directory | |
if [ -n "$(git status --porcelain)" ]; then | |
echo "You need to have clean working copy" | |
exit 1 | |
fi; | |
git checkout $1 |
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
Windows Registry Editor Version 5.00 | |
[HKEY_CLASSES_ROOT\Directory\shell\PHP Storm] | |
@="Open in &PHP Storm" | |
"icon"="\"C:\\bin\\PhpStorm.cmd\"" | |
[HKEY_CLASSES_ROOT\Directory\shell\PHP Storm\command] | |
@="\"C:\\bin\\PhpStorm.cmd\" \"%1\"" |
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
{ | |
"repositories": [ | |
{ | |
"type": "path", | |
"url": "/path/to/project" | |
} | |
], | |
} |
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
version: "3" | |
services: | |
apache: &apacheConfig | |
build: . | |
volumes: | |
- ./:/var/www/html:cached | |
- ./docker/php-apache/php.ini:/usr/local/etc/php/php.ini | |
- ./docker/php-apache/ssl-local:/etc/httpd/ssl | |
working_dir: /var/www/html | |
ports: |
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
Required cygwin packages: | |
* tesseract-ocr | |
* ghostscript | |
* imagemagick | |
usr/bin/convert.exe -density 400 input.pdf -depth 8 output.tiff | |
tesseract -l eng -psm 1 output.tiff output_textfile |
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
@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; |
NewerOlder