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
sudo apt-get update | |
sudo apt-get install apt-transport-https ca-certificates -y | |
sudo apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D | |
sudo echo deb https://apt.dockerproject.org/repo ubuntu-xenial main >> /etc/apt/sources.list.d/docker.list | |
sudo apt-get update | |
sudo apt-get purge lxc-docker | |
sudo apt-get install linux-image-extra-$(uname -r) -y | |
sudo apt-get install docker-engine cgroup-lite apparmor -y | |
# Install docker-compose |
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 | |
try { | |
$soapClient = new SoapClient('https://webapi.allegro.pl/service.php?wsdl'); | |
} catch(Exception $e) { | |
echo $e->getMessage(); | |
} | |
echo 'OK'; |
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 ContactController extends ContactControllerCore | |
{ | |
public function postProcess() | |
{ | |
if (Tools::isSubmit('submitMessage')) { | |
$response = $_POST["g-recaptcha-response"]; | |
$url = 'https://www.google.com/recaptcha/api/siteverify'; | |
$data = array( |
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
sudo docker exec -i -t name /bin/bash | |
echo -e "\n php_value max_input_vars 10000" >> /var/www/html/.htaccess |
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 | |
coproc bluetoothctl | |
echo -e 'scan on\n' >&${COPROC[1]} | |
sleep 3 | |
echo -e 'remove AA:AA:AA:AA:AA:AA\n' >&${COPROC[1]} | |
sleep 1 | |
echo -e 'pair AA:AA:AA:AA:AA:AA\n' >&${COPROC[1]} | |
sleep 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
{if isset($features) && count($features)} | |
<ul> | |
{foreach from=$features item=f key=key} | |
{if $f.name|strpos:"FILTR" === false} | |
<li>{$f.name|escape:'html':'UTF-8'} - <b>{$f.value|escape:'html':'UTF-8'}</b></li> | |
{/if} | |
{/foreach} | |
</ul> | |
{/if} |
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.3' | |
services: | |
ps1_db: | |
image: mysql:5.7 | |
volumes: | |
- /var/lib/mysql | |
restart: always | |
environment: | |
MYSQL_ROOT_PASSWORD: admin |
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 | |
require(dirname(__FILE__).'/config/config.inc.php'); | |
Db::getInstance()->Execute( | |
'UPDATE`'._DB_PREFIX_.'employee` SET `passwd` = "'.md5(_COOKIE_KEY_.'12345678').'"' | |
); |
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 os | |
import argparse as ap | |
parser = ap.ArgumentParser(description="Quick rename") | |
parser.add_argument("--dir") | |
args, leftovers = parser.parse_known_args() | |
path = './' | |
if args.dir is not None: | |
path = args.dir |
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 | |
$catgoriesXmlPath = __DIR__.'/ceneo-categories.xml'; | |
$xml = simplexml_load_string(file_get_contents($catgoriesXmlPath)); | |
$out = []; | |
foreach($xml->Category as $xmlCategory) { | |
recurseExtract($out, '', $xmlCategory); | |
} |
OlderNewer