Skip to content

Instantly share code, notes, and snippets.

João Junior jrxpress

Block or report user

Report or block jrxpress

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@jrxpress
jrxpress / block-robots.php
Created Aug 12, 2017 — forked from irazasyed/block-robots.php
PHP: Block Robots using Headers in PHP.
View block-robots.php
<?php
@header('X-Robots-Tag: "none, noindex, nofollow, noarchive, nosnippet, noodp, notranslate, noimageindex"');
View amember
/* SAMPLE AMEMBER STUFF */
<?php
session_start();
// is user logged in?
$user = $_SESSION['_amember_user'];
if ($user['member_id'] > 0){
print "Hello $user[name_f] $user[name_l]<br>\n";
$need_one_from = array(3);
if (array_intersect($need_one_from, $_SESSION['_amember_product_ids'])){
// they're good. keep loading.
@jrxpress
jrxpress / site.php
Created Aug 13, 2017 — forked from cgi-caesar/site.php
aMember (site.php): How to redirect user to custom landing page once he cancel his subscription
View site.php
<?php
Am_Di::getInstance()->front->registerPlugin(new class extends Zend_Controller_Plugin_Abstract {
public function preDispatch(Zend_Controller_Request_Abstract $request)
{
if ($request->getModuleName() == 'default' &&
$request->getControllerName() == 'member' &&
$request->getActionName() == 'payment-history') {
$di = Am_DI::getInstance();
@jrxpress
jrxpress / clamav_scan_daily
Last active Apr 1, 2019
cPanel ClamAV Cron Job
View clamav_scan_daily
#!/bin/sh
# cPanel ClamAV Cron Job
for i in `awk '!/nobody/{print $2 | "sort | uniq"}' /etc/userdomains | sort | uniq`; do
SUBJECT="cPanel ClamAV scan report for account ${i}"
DIRTOSCAN=$(getent passwd ${i} | cut -d: -f6)
# Log location
You can’t perform that action at this time.