View Readme.txt
Patch for Ubercart hidden checkout error
Uc_cart version: 6.x-2.15
Drupal version: 6.38
Ubercart hidden checkout error:
No error message appeared when the database connection error occurred.
The drupal user wasn't created and the customer received only one email (below) with the account settings but the username was empty.
The order remained in the state "in checkout".
View gist:8248935

Postfix SMTP authentication and Dovecot SASL

  • /etc/postfix/master.cf
  smtp      inet  n       -       -       -       -       smtpd
  submission inet n       -       -       -       -       smtpd
    -o smtpd_tls_security_level=encrypt
    -o smtpd_sasl_auth_enable=yes
View gist:2b219d7684b73692c96f
<script type="text/javascript">
<!--
try { $('.Image')[0].outerHTML=''; } catch(err) {};
-->
</script></p>
<p><a href="#" onclick="Lightbox.start(
$('#galleria-content ul.galleria li a:eq(0)')[0]);
return false;"><img src="/sites/default/files/posli_to_dal2.jpg" style="float: left;"/></a></p>
View disable_request_new_password.info
; $Id$
name = Disable Request new password
description = Disable 'Request new password' functionality
core = 6.x
package = "Other"
version = "6.x-0.1"
View .zshrc
setopt extended_glob csh_null_glob
maintenance() {
echo "Maintenance mode."
cat <<EOF | mysql -u drupal -pPASSWORD drupal && echo "OK."
DELETE FROM variable WHERE name = 'site_offline';
INSERT INTO variable (name, value) VALUES ('site_offline', 's:1:"1";');
DELETE FROM cache WHERE cid = 'variables';
View imgfft.m
%% run in Octave:
%% source 'imgfft.m'
filename = 'image.jpg';
img = imread(filename);
img2=double(img);
img3= (img2(:,:,1)+img2(:,:,2)+img2(:,:,3))/3;
View gist:7741936
fix () {
for x in *
do
mv -- "$x" `echo "$x" | sed 's/[^-.a-zA-Z0-9]\+/-/g'` 2> /dev/null
done
}
View martinmev.py
#!/usr/bin/env python
import numpy as np
from sklearn import grid_search
from sklearn import cross_validation as cv
from sklearn.svm import SVC
from sklearn.cross_validation import StratifiedKFold
from sklearn.decomposition import PCA
loadData = lambda f: np.genfromtxt(open(f,'r'), delimiter=',')
View flat.pde
// Copyright Martin Mevald 2013.
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
// https://gist.github.com/martinmev/5281794
// PDFs and PNGs:
// https://www.dropbox.com/sh/vwdpj0m79e09mek/_Qj_S9iLuE
import processing.pdf.*;
View get_delivery_errors.py
#!/usr/bin/env python
import sys
def writeErrors(mbox,filename):
isMessage=lambda c: mbox[c].strip()=='The mail system'
getMessage = lambda c,s: s if mbox[c].strip()=='' else s+' '+getMessage(c+1,mbox[c].strip())
counter=0
f=open(filename,'w')
while counter<len(mbox):