Skip to content

Instantly share code, notes, and snippets.

Rene Kreijveld renekreijveld

View GitHub Profile
@renekreijveld
renekreijveld / php.ini
Created Feb 6, 2019
php.ini for local development, PHP 7.0
View php.ini
[PHP]
;;;;;;;;;;;;;;;;;;;
; About php.ini ;
;;;;;;;;;;;;;;;;;;;
; PHP's initialization file, generally called php.ini, is responsible for
; configuring many of the aspects of PHP's behavior.
; PHP attempts to find and load this configuration from a number of locations.
; The following is a summary of its search order:
@renekreijveld
renekreijveld / php.ini
Created Feb 6, 2019
php.ini for local development, PHP 5.6
View php.ini
[PHP]
;;;;;;;;;;;;;;;;;;;
; About php.ini ;
;;;;;;;;;;;;;;;;;;;
; PHP's initialization file, generally called php.ini, is responsible for
; configuring many of the aspects of PHP's behavior.
; PHP attempts to find and load this configuration from a number of locations.
; The following is a summary of its search order:
@renekreijveld
renekreijveld / No WordPress urls allowd in Joomla
Created Aug 14, 2018
Add this code snippet to .htaccess of your Joomla website after RewriteEngine On
View No WordPress urls allowd in Joomla
## Redirect WordPress attempts - BEGIN
Redirect 301 /wp-login.php http://127.0.0.1/wp-login.php
Redirect 301 /wp-admin.php http://127.0.0.1/wp-admin.php
RewriteRule ^wp-content(.*)$ http://127.0.0.1/$1 [L,R=301]
RewriteRule ^wp-admin(.*)$ http://127.0.0.1/$1 [L,R=301]
## Redirect WordPress attempts - END
@renekreijveld
renekreijveld / rsformprocleanup.php
Last active May 4, 2018
RSForm!Pro cleanup old submissions
View rsformprocleanup.php
<?php
/**
* @package RSFormCleanUp
* @copyright Copyright 2018 René Kreijveld, DSD Business Internet.
* @license GNU General Public License version 2 or later.
*/
/**
* A command line cron job to remove submission data from RSFormPro database tables.
* Based on the excellent work of Peter Martin, db8.nl, see https://gist.github.com/pe7er/47bf1020b12ef29df8603fa80d1fdccd
@renekreijveld
renekreijveld / gencodes.php
Last active Oct 11, 2017
Joomla CLI script to generate unique codes with a predefined length.
View gencodes.php
<?php
/**
* gencodes.php
*
* This Joomla CLI script can generate unique codes of a predefined length.
* The codes are written to standard output.
*
* Modify the value of variables $how_many and $code_length to your liking.
*
* Installation: upload this file to your Joomla CLI folder.
@renekreijveld
renekreijveld / getCategories.php
Last active Feb 22, 2017
This function will build and return an array of all parent category id's that an article belongs to.
View getCategories.php
/**
* This function will build and return an array of all parent category id's that an article belongs to.
* Written by René Kreijveld, email [at] renekreijveld.nl
* 22-feb-2017
*
* Example function call for an article with id = 100:
* $parentCategories = $this->getCategories(100, 0);
*
*/
private function getCategories($artId, $catId)
View keybase.md

Keybase proof

I hereby claim:

  • I am renekreijveld on github.
  • I am renekreijveld (https://keybase.io/renekreijveld) on keybase.
  • I have a public key whose fingerprint is F75D 93F8 F076 074F 4EE8 E99C AEC3 777E 175C EE61

To claim this, I am signing this object:

@renekreijveld
renekreijveld / listupdates
Last active Feb 22, 2018
Bash script to find all Joomla extension updates in all Joomla instances on a DirectAdmin based server
View listupdates
#!/bin/sh
# listupdates -- Find Joomla instances and show all extension updates
#
# Copyright 2016 Rene Kreijveld - r.kreijveld@dsd.nu
#
# This program is free software; you may redistribute it and/or modify it.
#
# Version history
# 1.0 Initial version
@renekreijveld
renekreijveld / listupdates.php
Last active Feb 22, 2018
List extension updates
View listupdates.php
<?php
/**
* @package Joomla.Cli
*
* @copyright Copyright (C) 2016 Rene Kreijveld, All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
/**
* This is a script which should be called from the command-line, not the web.
View jfunctions
#!/bin/sh
# jfunctions - general bash functions for use in Joomla bash scripts
# Supports Joomla versions 2.5 - 3.4
#
# Copyright 2014 Rene Kreijveld - r.kreijveld@dsd.nu
#
# This program is free software; you may redistribute it and/or modify it.
#
# Version history
You can’t perform that action at this time.