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
| // For Windows 32 | |
| // i686-w64-mingw32-g++-win32 -static-libstdc++ -static-libgcc -o hackme_win32.exe hackme.cpp | |
| // wine hackme_win32.exe | |
| // For Windows 64 | |
| // x86_64-w64-mingw32-g++ -static-libstdc++ -static-libgcc -o hackme_win64.exe hackme.cpp | |
| // wine hackme_win64.exe | |
| #include <iostream> | |
| int main() { |
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 | |
| class Amount | |
| { | |
| public function getFormattedAmount($locale, $currency) | |
| { | |
| $formatter = new \NumberFormatter($locale, \NumberFormatter::CURRENCY); | |
| return $formatter->formatCurrency($this->amount, $currency); | |
| } | |
| } |
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
| find . -name "someFile.po" \ | |
| | grep someSourceDir \ | |
| | xargs -I{} sh -c 'old={}; new=$(echo $old | sed "s/someFile.po/someNewFile.po/g"); cp $old $new' |
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 | |
| namespace Sokil\EventListener; | |
| use Symfony\Component\HttpKernel\Event\GetResponseEvent; | |
| use Symfony\Component\HttpKernel\KernelEvents; | |
| use Symfony\Component\EventDispatcher\EventSubscriberInterface; | |
| class JsonRequestListener implements EventSubscriberInterface | |
| { |
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
| CREATE TRIGGER `pt_osc_test_users_del` AFTER DELETE ON `test`.`users` FOR EACH ROW DELETE IGNORE FROM `test`.`_users_new` WHERE `test`.`_users_new`.`id` <=> OLD.`id` | |
| CREATE TRIGGER `pt_osc_test_users_upd` AFTER UPDATE ON `test`.`users` FOR EACH ROW REPLACE INTO `test`.`_users_new` (`id`, `name`, `password`) VALUES (NEW.`id`, NEW.`name`, NEW.`password`) | |
| CREATE TRIGGER `pt_osc_test_users_ins` AFTER INSERT ON `test`.`users` FOR EACH ROW REPLACE INTO `test`.`_users_new` (`id`, `name`, `password`) VALUES (NEW.`id`, NEW.`name`, NEW.`password`) |
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 | |
| # delimited by tab | |
| join -t $'\t' <(cat file1 | sort) <(cat file2 | sort) | |
| # join fields | |
| join -t $'\t' -a1 -e 'NULL' -o auto <(cat file1.csv | sort) <(cat file2.csv | sort | uniq -w 32) |
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
| server | |
| { | |
| listen 80; # default_server | |
| server_name {SERVER_NAME}; | |
| # SSL. | |
| # Uncomment to enable | |
| # listen 443 ssl; | |
| # ssl_certificate /path/to/ssl.crt; | |
| # ssl_certificate_key /path/to/ssl.key; |
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 | |
| # config | |
| jsFilesDir=./../public/js/ | |
| compiledJsFilename=compiled.js | |
| # init js files array | |
| js=( | |
| a.js | |
| b.js |
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
| export PHP_XDEBUG_ENABLED=1 | |
| export PHP_IDE_CONFIG="serverName=%PhpStormServerName%" | |
| export XDEBUG_CONFIG="idekey=PHPSTORM remote_host=%RemoteIp% remote_port=%RemotePort% remote_enable=1 remote_autostart=1" | |
| php $@ |