Skip to content

Instantly share code, notes, and snippets.

View vboctor's full-sized avatar

Victor Boctor vboctor

View GitHub Profile
@vboctor
vboctor / Sample Gist for testing
Created May 22, 2020 19:49
This is the description of the gist.
This is the content of the gist.
@vboctor
vboctor / tarsnap-install.sh
Last active April 16, 2016 21:53 — forked from mdigital/tarsnap-install.sh
Debian / Ubuntu Tarsnap installation
#!/bin/sh
# Installs tarsnap client on Debian and Ubuntu
#
# You'll need to setup an account at
# http://www.tarsnap.com
# and load it with some funds
#
# Make sure you run this as root
#
@vboctor
vboctor / keybase.md
Created June 1, 2015 19:23
keybase.md

Keybase proof

I hereby claim:

  • I am vboctor on github.
  • I am vboctor (https://keybase.io/vboctor) on keybase.
  • I have a public key whose fingerprint is 8079 96A5 AAFD C2F3 466D D672 9839 9BB0 8EBC 1D10

To claim this, I am signing this object:

<?php
/*
This script works much like gravatar
Put avatar files in $imagedir with the same name as the md5sum of the users emailaddress
*/
$imagedir = "/usr/share/mantis/www/avatar/images/";
$allOk = true;
$requestedfile = false;
@vboctor
vboctor / custom_strings_inc.php
Created September 6, 2014 06:21
Replace a string in all MantisBT custom strings
<?php
$t_vars = get_defined_vars();
foreach ( array_keys( $t_vars ) as $t_var ) {
if ( substr( $t_var, 0, 2 ) == 's_' ) {
$t_value = $$t_var;
$t_value = str_replace( 'Issue', 'Bug', $t_value );
$$t_var = $t_value;
}
}
@vboctor
vboctor / config_inc.php
Created May 3, 2013 06:55
Enabling strict PHP error reporting in MantisBT to figure out errors that could break functionality like the SOAP API, MantisTouch, and possibly others. It is recommended to always have such strict error reporting when changing configs, customization, core development, or developing plugins.
// Add the following to the end of your config_inc.php
#
# Enable strict error reporting
#
$g_display_errors = array(
E_WARNING => 'halt',
E_NOTICE => 'halt',
E_USER_ERROR => 'halt',