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
Prefix | Description | Notes | |
---|---|---|---|
sk_live_ | Live secret key | Secret key in a live environment. | |
pk_live_ | Live public key | Public key in a live environment. | |
pst_live_ | Live Connection token | Connection token in a live environment. | |
sk_test_ | Test secret key | Pecret key in a test environment. | |
pk_test_ | Test public key | Public key in a test environment. | |
pst_test_ | Test Connection token | Connection token in a test environment. | |
ac_ | Platform Client ID | Identifier for an auth code/client id. | |
acct_ | Account ID | Identifier for an Account object. | |
ch_ | Charge ID | Identifier for a Charge object. |
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
sudo truncate -s 0 /var/log/apache2/error.log | |
sudo truncate -s 0 /var/log/apache2/access.log |
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
<IfModule mod_headers.c> | |
## CSP | |
Header set Content-Security-Policy: default-src 'self'; img-src 'self' https://singlepage.it; object-src 'none'; script-src 'self'; style-src 'self'; frame-ancestors 'self'; base-uri 'self'; form-action 'self'; | |
## Security Headers | |
Header set X-XSS-Protection: 1; mode=block | |
Header set Access-Control-Allow-Origin: https://www.singlepage.it | |
Header set X-Frame-Options: deny | |
Header set X-Content-Type-Options: nosniff | |
Header set Strict-Transport-Security: max-age=3600; includeSubDomains |
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
<IfModule mod_headers.c> | |
## CSP | |
Header set Content-Security-Policy: default-src 'self'; img-src 'self' https://singlepage.it; object-src 'none'; script-src 'self'; style-src 'self'; frame-ancestors 'self'; base-uri 'self'; form-action 'self'; | |
## Security Headers | |
Header set X-XSS-Protection: 1; mode=block | |
Header set Access-Control-Allow-Origin: https://www.singlepage.it | |
Header set X-Frame-Options: deny | |
Header set X-Content-Type-Options: nosniff | |
Header set Strict-Transport-Security: max-age=3600; includeSubDomains |
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
sudo nano ~/.bashrc | |
force_color_prompt=yes | |
color_prompt=yes | |
parse_git_branch() { | |
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/' | |
} | |
if [ "$color_prompt" = yes ]; then | |
PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[01;31m\]$(parse_git_branch)\[\033[00m\]\$ ' | |
else |
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
git config --global color.ui true | |
sudo nano ~/.gitconfig | |
[color] | |
ui = auto | |
[color "branch"] | |
local = yellow | |
current = yellow reverse | |
remote = green |
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 | |
$dir = "img/tmp/"; | |
$images_array = glob($dir.'*.jpg'); | |
foreach ($images_array as $image) { | |
$img = new Imagick(); | |
$img->readImage($image); | |
$img->setImageCompression(Imagick::COMPRESSION_JPEG); |
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
{$urls|@var_dump} -> Contains Prestashop urls; | |
{$shop|@var_dump} -> Contains shop variables (shop name, email, phone, etc...); | |
{$page|@var_dump} -> Contains current page variables; | |
{$currency|@var_dump} -> Currency variables; | |
{$language|@var_dump} -> Language variables; | |
{$customer|@var_dump} -> Customer variables; | |
{$configuration|@var_dump} -> Configuration variables; | |
{$link|@var_dump} -> Link variables; | |
{$breadcrumb|@var_dump} -> Breadcrumb variables; | |
{$currency.name} -> Name of the active 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
***************** | |
*The Data Object* | |
***************** | |
<?php | |
class TheData extends DataObject { | |
public static $db = array( | |
'Name' => 'Varchar', | |
'SecretData' => 'Varchar' |
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 EmailPage extends Page { | |
} | |
class EmailPage_Controller extends Page_Controller { | |
private static $allowed_actions = array( | |
'Form' | |
); |
NewerOlder