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 | |
class Category extends CategoryCore | |
{ | |
public function getProducts($id_lang, $p, $n, $orderBy = NULL, $orderWay = NULL, $getTotal = false, $active = true, $random = false, $randomNumberProducts = 1, $checkAccess = true) | |
{ | |
$id_country = Country::getDefaultCountryId(); | |
$builder = ProductQueryBuilder::create($id_lang, $id_country) |
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
/* replace special blocks by "{php}" */ | |
$source_content = preg_replace_callback($search, function($matches) { | |
return '{php' . str_repeat("\n", substr_count('\0', "\n")) . '}'; | |
}, $source_content); | |
// $source_content = preg_replace($search.'e', "'" | |
// . $this->_quote_replace($this->left_delimiter) . 'php' | |
// . "' . str_repeat(\"\n\", substr_count('\\0', \"\n\")) .'" | |
// . $this->_quote_replace($this->right_delimiter) | |
// . "'" | |
// , $source_content); |
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
--- /smartdc/bin/sdc-lastcomm Fri May 30 03:16:17 2014 | |
+++ /smartdc/bin/sdc-lastcomm Tue Apr 21 11:23:16 2015 | |
@@ -48,10 +48,19 @@ | |
echo "-R is not valid with -d" | |
exit 1 | |
fi | |
+ MAX_SLEEP=3 | |
+ cd "$DIR" || exit 1 | |
+ # Save the current audit log filename | |
+ AUDIT_LOG=`find . -name "*.not_terminated.*"` |
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
$TTL 3600 | |
@ IN SOA ns.sunfox.cz. sunfox.sunfox.cz. ( | |
2016010902 ; serial, todays date + todays serial # | |
7200 ; refresh, seconds | |
540 ; retry, seconds | |
604800 ; expire, seconds | |
86400 ) ; minimum, seconds | |
; | |
2.0.0.0.0.0.6.c.2.0.a.2.ip6.arpa. 3600 NS ns.sunfox.cz. |
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 | |
echo "$(hostname) SSHFP 1 2 $(cut -f2 -d ' ' "/etc/ssh/ssh_host_rsa_key.pub" | base64 --decode | sha256sum | cut -f 1 -d ' ')" | |
echo "$(hostname) SSHFP 4 2 $(cut -f2 -d ' ' "/etc/ssh/ssh_host_ed25519_key.pub" | base64 --decode | sha256sum | cut -f 1 -d ' ')" |
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 | |
current_version=$(uname -r | sed 's/-generic\|-virtual//') | |
kernels=$(dpkg -l | grep 'linux-image-[0-9]' | awk '{print $2}') | |
latest_kernel=$(echo $kernels | tr ' ' '\n' | tail -1) | |
remove_kernels=$(echo $kernels | tr ' ' '\n' | grep -v $latest_kernel | grep -v $current_version) | |
headers=$(dpkg -l | grep 'linux-headers-[0-9]' | awk '{print $2}') | |
latest_headers=$(echo $headers | tr ' ' '\n' | tail -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
<?php declare(strict_types=1); | |
final class Passwords | |
{ | |
private const OLD_SALT = 'xxx'; | |
public const PS_OLD = 'prestashop_old'; | |
public const PS_HASHED = 'prestashop_hashed'; | |
public const BCRYPT = 'bcrypt'; |
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 declare(strict_types=1); | |
namespace App\Presenters; | |
use Kdyby\Translation\Translator; | |
use Nette\Application\Helpers; | |
use Nette\Application\UI\Presenter; | |
abstract class BasePresenter extends Presenter | |
{ |
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
CREATE TABLE `dns_record` ( | |
`id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, | |
`origin` varchar(63) COLLATE utf8_bin NOT NULL, | |
`name` varchar(255) COLLATE utf8_bin NOT NULL, | |
`type` char(6) COLLATE utf8_bin NOT NULL, | |
`value` text COLLATE utf8_bin NOT NULL, | |
PRIMARY KEY (`id`), | |
KEY `origin` (`origin`), | |
KEY `type` (`type`) | |
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin; |
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/sh | |
openssl req -x509 -nodes -days 3650 -subj "/C=CZ/ST=CZ/O=Application/CN=app.test" -addext "subjectAltName=DNS:app.test" -newkey rsa:2048 -keyout app.key -out app.crt |
OlderNewer