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 | |
//error_reporting(E_ALL); | |
//ini_set('display_errors', 1); | |
if (!function_exists('self_canonical')) | |
{ | |
function self_canonical($currentContext) | |
{ | |
global $modx; |
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
--- | |
ip: "192.168.10.10" | |
memory: 2048 | |
cpus: 1 | |
provider: virtualbox | |
authorize: ~/.ssh/id_rsa.pub | |
keys: | |
- ~/.ssh/id_rsa |
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
// source https://css-tricks.com/snippets/javascript/get-url-variables/ | |
/* | |
Usage | |
Example URL: | |
http://www.example.com/index.php?id=1&image=awesome.jpg | |
Calling getQueryVariable("id") - would return "1". | |
Calling getQueryVariable("image") - would return "awesome.jpg". | |
*/ |
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
$(function(){ | |
$(".btn-large").on('click', function() { | |
var name = (this.text + " - " + this.id); | |
if(typeof(analytics) == 'object') { | |
analytics.track('Clicked', { | |
category: 'Webtrader', | |
label: name | |
}); | |
} | |
}); |
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
[[!FormIt? &hooks=`email,redirect` | |
&redirectTo=`123` | |
&emailSubject=`Feedback from [[!++http_host]] ([[!++legalName]])` | |
&emailTpl=`EMAIL_TEMPLATE` | |
&emailTo=`[[+Username]]` | |
&clearFieldsOnSuccess=`1` | |
&validate=`workemail:blank, | |
Name:required:regexp=^/[A-Za-z]$/^, | |
Surname:required:regexp=^/[A-Za-z]$/^, | |
Phone:required:minLength=^4^:maxLength=^15^:regexp=/^(\+)*[0-9(\s)]+$/, |
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 | |
use Cache; // alias from laravel | |
use Symfony\Component\DomCrawler\Crawler; | |
use GuzzleHttp\Client; | |
public function parsePlayStore($url='') | |
{ | |
$parsedUrl = parse_url($url, PHP_URL_QUERY); | |
$packageNameFromUrl = 'com.inponsel.android'; |
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
config.vm.provision "shell", inline: <<-SHELL | |
mv /var/www/public /var/www | |
sudo sed -i s,/var/www/public,/var/www,g /etc/apache2/sites-available/000-default.conf | |
sudo sed -i s,/var/www/public,/var/www,g /etc/apache2/sites-available/scotchbox.local.conf | |
sudo service apache2 restart | |
SHELL |
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 Manager\ManagerBundle\Controller\Management; | |
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Method; | |
use Symfony\Bundle\FrameworkBundle\Controller\Controller; | |
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route; | |
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Template; | |
use Symfony\Component\HttpFoundation\Request; | |
use Symfony\Component\HttpFoundation\Response; |
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 | |
private function sendRequest($URL) | |
{ | |
return Requests::get($URL, $this->headers, $this->options)->body; | |
} | |
// Getting form values |