Skip to content

Instantly share code, notes, and snippets.

Damien Regad dregad

  • Switzerland
View GitHub Profile
@dregad
dregad / dokuwiki_fix_timestamp.sh
Created Jun 19, 2018
DokuWiki set timestamp to fix `(external edit)`
View dokuwiki_fix_timestamp.sh
#!/bin/bash
# DokuWiki helper script to fix the pages's last modified time stamp
# to match the one recorded in the metadata.
# This fixes pages shown as 'last modified by (external edit)', e.g. after
# restoring the wiki from a backup without preserving the files' timestamp.
#
# Copyright (c) 2018 Damien Regad
#
# Revision history
@dregad
dregad / create_test_users.php
Created May 23, 2016
Mantis test users creation script
View create_test_users.php
#!/usr/bin/env php
<?php
define( 'MANTIS_CORE', 'core.php' );
if( !file_exists( MANTIS_CORE ) ) {
echo "ERROR: Mantis Core not found in current directory. Run the script from Mantis Home.\n";
die(1);
}
require_once( MANTIS_CORE );
@dregad
dregad / Mantis 1.2.x
Created Jul 24, 2013
Mantis / PHP compatibility notes
View Mantis 1.2.x
$ phpcompatinfo print mantisbt/ -R --report full >/tmp/rpt
filtering output:
$ grep -v -E "(4\..\..|5.(0\..|1\.0))[^/]" /tmp/rpt |grep "^. [0-9]$"
---------------------------------------------------------------------
json 5.2.0 5.2.0 2
curl_setopt_array curl-5.1.3 5.1.3 1
json_decode json-5.2.0 5.2.0 1
@dregad
dregad / TestSourceGithub.php
Last active Dec 16, 2015
This page allows testing of the SourceGithub plugin by simulating the sending of a Github post_receive hook's payload
View TestSourceGithub.php
<?php
# Testing for SourceGithub checkin process
$bin = get( 'bin', '' );
$req = get( 'req', '' );
$api = 'http://requestb.in/api/v1/bins';
$tpl_list = "$api/%s/requests";
$tpl_reqs = "$api/%s/requests/%s";
@dregad
dregad / ssh-agent-init.bat
Created Dec 16, 2012
Load Putty Pageant and Charade SSH agent in memory and initialize the environment variables for future use by OpenSSH (e.g. Cygwin)
View ssh-agent-init.bat
@ECHO OFF
REM ===========================================================================
REM
REM ssh-agent-init.bat
REM
REM Load Putty Pageant and Charade SSH agent in memory and initialize the
REM environment variables for future use by OpenSSH (e.g. Cygwin)
REM
REM Prerequisites:
REM - charade [1]
@dregad
dregad / diff_adodb510_mantis12x.patch
Created May 31, 2012
MantisBT / ADOdb diffs upstream 5.10 vs 1.2.x
View diff_adodb510_mantis12x.patch
diff -r -w -u mantis_adodb5.10/adodb-datadict.inc.php ../dev/mantisbt/library/adodb/adodb-datadict.inc.php
--- mantis_adodb5.10/adodb-datadict.inc.php 2012-05-31 14:56:22.450304922 +0200
+++ ../dev/mantisbt/library/adodb/adodb-datadict.inc.php 2012-05-31 14:57:37.554308740 +0200
@@ -715,12 +715,12 @@
$ftype = $this->_GetSize($ftype, $ty, $fsize, $fprec);
- if ($ty == 'X' || $ty == 'X2' || $ty == 'B') $fnotnull = false; // some blob types do not accept nulls
+ //if ($ty == 'X' || $ty == 'X2' || $ty == 'B') $fnotnull = false; // some blob types do not accept nulls
@dregad
dregad / http - ok
Created Nov 14, 2011
git clone https NTLM proxy fails with "remote HEAD refers to nonexistent ref"
View http - ok
Cloning into guillotine...
* About to connect() to proxy proxy.COMPANY.com port 8080 (#0)
* Trying XXX.XXX.XXX.XXX... * Connected to proxy.COMPANY.com (XXX.XXX.XXX.XXX) port 8080 (#0)
> GET http://github.com/technoweenie/guillotine.git/info/refs?service=git-upload-pack HTTP/1.1
User-Agent: git/1.7.5.4
Host: github.com
Accept: */*
Proxy-Connection: Keep-Alive
Pragma: no-cache
You can’t perform that action at this time.