Skip to content

Instantly share code, notes, and snippets.

View renekreijveld's full-sized avatar

Rene Kreijveld renekreijveld

View GitHub Profile
@renekreijveld
renekreijveld / jdbrepair
Created October 17, 2014 18:55
Repair all tables of a joomla database.
#!/bin/sh
# jdbrepair -- Repair all tables of a joomla database.
#
# This scripts supports Joomla versions 1.0 - 3.3
#
# Copyright 2014 Rene Kreijveld - email@renekreijveld.nl
#
# This program is free software; you may redistribute it and/or modify it.
#
@renekreijveld
renekreijveld / jdbsession
Created October 17, 2014 18:55
Repair the session table of a Joomla database table.
#!/bin/sh
# jdbsession -- Repair the session table of a Joomla database table.
#
# This scripts supports Joomla versions 1.0 - 3.3
#
# Copyright 2014 Rene Kreijveld - email@renekreijveld.nl
#
# This program is free software; you may redistribute it and/or modify it.
#
@renekreijveld
renekreijveld / joomlainfo.cmd
Created October 15, 2014 13:24
Display Joomla 2.5+ website info for Windows
@ECHO OFF
REM Joomla info ophalen
call "jinfo.cmd" > nul
REM Output data
ECHO Sitename = %jsitename%
ECHO Host = %jhost%
ECHO Database = %jdb%
ECHO User = %juser%
@renekreijveld
renekreijveld / jinfo.cmd
Created October 15, 2014 13:24
Gather info about a Joomla 2.5+ installation for Windows
@ECHO OFF
REM Sitenaam ophalen
FOR /F "tokens=4" %%G IN ('FINDSTR /C:"$sitename =" configuration.php') DO (
FOR /F "tokens=1 delims='" %%A IN ('echo %%G') DO (
SET jsitename=%%A
)
)
REM Host ophalen
@renekreijveld
renekreijveld / timestamp.cmd
Last active August 29, 2015 14:07
Create a date-time stamp in Windows batch file
@echo off
for /f "tokens=1-8 delims=.:/-, " %%i in ('echo exit^|cmd /q /k"prompt $D $T"') do (
for /f "tokens=2-4 delims=/-,() skip=1" %%a in ('echo.^|date') do (
set dow=%%i
set mm=%%j
set dd=%%k
set yy=%%l
set hh=%%m
set min=%%n
@renekreijveld
renekreijveld / findlargefiles
Created August 13, 2014 13:15
Find all image files with a resolution wider then a given width.
#!/bin/sh
# findlargefiles - Find all image files with a resolution wider then a given width.
# Supports Joomla versions 1.0 - 3.3
#
# Copyright 2014 Rene Kreijveld - email@renekreijveld.nl
#
# This program is free software; you may redistribute it and/or modify it.
# Define general variables
@renekreijveld
renekreijveld / jfindfiles
Last active March 11, 2021 07:03
Find unused and used content files in your Joomla website
#!/bin/sh
# jfindfiles -- Find used and unused content files in your Joomla website
#
# This scripts supports Joomla versions 2.5 - 3.x
#
# Copyright 2014 Rene Kreijveld - email@renekreijveld.nl
#
# This program is free software; you may redistribute it and/or modify it.
#
@renekreijveld
renekreijveld / jbackupstore
Created July 3, 2014 11:22
Create a full backup of a Joomla website to tar gzip file and store in backup directory
#!/bin/sh
# jbackupstore -- Create a full backup of a Joomla website to tar gzip file and store in backup directory
#
# Copyright 2012 Rene Kreijveld - email@renekreijveld.nl
#
# This program is free software; you may redistribute it and/or modify it.
#
# Warning! This script needs the file joomlafunctions. This has to be installed in the same directory as this script.
#
@renekreijveld
renekreijveld / sitesbackup
Last active August 29, 2015 14:03
Find Joomla instances and backup them
#!/bin/sh
# sitesbackup -- Find Joomla instances and backup them
# Supports all Joomla versions
# Requires jbackupstore script
#
# Backups older than 5 days are automatically cleaned
#
# Copyright 2014 Rene Kreijveld - email@renekreijveld.nl
#
@renekreijveld
renekreijveld / geocide.php
Created May 23, 2014 12:11
A simple function/script for geocoding Address using Google Maps API.
<?php
/* A simple function/script for geocoding Address using Google Maps API.
* Please check Google Maps API FAQ & Terms for more info.
*
* @author Abdullah Rubiyath
*/
/**
* Returns a Lat and Lng from an Address using Google Geocoder API. It does not