Skip to content

Instantly share code, notes, and snippets.

Avatar

Rene Kreijveld renekreijveld

View GitHub Profile
@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 Sep 26, 2020
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
View OSmap sitemap.xml
Options +FollowSymLinks
RewriteEngine On
RewriteRule ^sitemap.xml$ index.php?option=com_osmap&view=xml&id=1 [L]
@renekreijveld
renekreijveld / formsreport.php
Last active Oct 6, 2016
Daily report of RSForm!Pro form submissions
View formsreport.php
<?php
/**
* @package Formreport CLI
*
* @copyright Copyright (c)2016 René Kreijveld
* @license GNU General Public License version 2 or later
*/
/**
* Form Check CLI.
@renekreijveld
renekreijveld / gist:bef15b0045327c23e64894bcb48d3794
Created Sep 2, 2016
Repair non-working phpMyAdmin in MAMP PRO 4 for OSX
View gist:bef15b0045327c23e64894bcb48d3794
# Open Terminal on your Mac and do the following:
cd "/Library/Application Support/appsolute/MAMP PRO/phpMyAdmin"
cp -R /Applications/MAMP/bin/phpMyAdmin/* .
@renekreijveld
renekreijveld / sitesinfo.php
Last active Feb 22, 2018
Watchful.li site overview through API
View sitesinfo.php
<?php
/**
* @package Watchful.li siteoverzicht
* @author Rene Kreijveld, based on the original work of Watchful.li
* @authorUrl https://about.me/renekreijveld
* @copyright (c) 2016, Rene Kreijveld
*/
//Config
define('API_KEY', 'plaats-jouw-watchful.li-api-key-hier');
View gist:a1a9e66e062125795e02
Verifying that +renekreijveld is my blockchain ID. https://onename.com/renekreijveld
View joomlaqueries.php
<?php
// Select record, all fields
$query = $db->getQuery(true)
->select('*')
->from($db->quoteName('#__table'))
->where($db->quoteName('id') . ' = '. (int) $searchId);
$db->setQuery($query);
$results = $db->loadObjectlist();
// Select record, specific fields
@renekreijveld
renekreijveld / searchlatlon.php
Last active Aug 29, 2015
Search lat/lom for address
View searchlatlon.php
$zoekadres = $l_adres." ".$l_postcode." ".$l_plaats." ".$l_land;
$zoekadres = urlencode($zoekadres);
$url = "http://maps.google.com/maps/api/geocode/json?sensor=false&address={$zoekadres}";
$resp_json = file_get_contents($url);
$resp = json_decode($resp_json, true);
if($resp['status']=='OK') {
$lat = $resp['results'][0]['geometry']['location']['lat'];
$lng = $resp['results'][0]['geometry']['location']['lng'];
} else {
$lat = "";