Skip to content

Instantly share code, notes, and snippets.

View mbeijen's full-sized avatar

Michiel W. Beijen mbeijen

View GitHub Profile
@mbeijen
mbeijen / jsonb.pl
Created January 18, 2015 21:21
use jsonb with '?' operator - for blog post https://huntingbears.nl/?p=86
#!/usr/bin/perl
use strict;
use warnings;
use Data::Dumper;
use DBD::Pg 3.5.0;
my $dbh = DBI->connect("dbi:Pg:", '', '',
{
AutoCommit => 1,
@mbeijen
mbeijen / syncqueues_csv2otrs.pl
Created January 12, 2012 14:00
Synchronize queues in OTRS based on a CSV file.
#!/usr/bin/perl -w
# --
# syncqueues_csv2otrs.pl - sync queue csv to otrs
# Copyright (C) 2012 OTRS BV, http://otrs.com/
# --
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU AFFERO General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# any later version.
#
@mbeijen
mbeijen / perl-DBD-ODBC.spec
Created July 21, 2012 14:17
RPM specfile for perl DBD::ODBC
Name: perl-DBD-ODBC
Version: 1.39
Release: 1%{?dist}
Summary: ODBC Driver for Perl DBI
Group: Development/Libraries
License: GPL+ or Artistic
URL: https://metacpan.org/module/DBD::ODBC
Source0: http://cpan.metacpan.org/authors/id/M/MJ/MJEVANS/DBD-ODBC-1.39.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
@mbeijen
mbeijen / perl-Cache-Memcached-Fast.spec
Created August 30, 2012 18:28
RPM specfile for perl Cache::Memcached::Fast
Name: perl-Cache-Memcached-Fast
Version: 0.19
Release: 1%{?dist}
Summary: Perl client for memcached, in C language
Group: Development/Libraries
License: GPL+ or Artistic
URL: http://search.cpan.org/dist/Cache-Memcached-Fast
Source0: http://search.cpan.org/CPAN/authors/id/K/KR/KROKI/Cache-Memcached-Fast-0.19.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
@mbeijen
mbeijen / perl-Gravatar-URL.spec
Created August 30, 2012 18:30
RPM specfile for perl Gravatar::URL
Name: perl-Gravatar-URL
Version: 1.06
Release: 1%{?dist}
Summary: Make URLs for Gravatars from an email address
License: GPL+ or Artistic
Group: Development/Libraries
URL: http://search.cpan.org/dist/Gravatar-URL/
Source0: http://www.cpan.org/authors/id/M/MS/MSCHWERN/Gravatar-URL-%{version}.tar.gz
BuildArch: noarch
BuildRequires: perl(parent)
@mbeijen
mbeijen / otrs.AddService.pl
Created September 14, 2012 06:40
Proper encoding of input and output for otrs.AddService.pl
#!/usr/bin/perl -w
# --
# bin/otrs.AddService.pl - add new Services
# Copyright (C) 2001-2012 OTRS AG, http://otrs.org/
# --
# $Id: otrs.AddService.pl,v 1.1.2.2 2012/06/27 21:56:51 mb Exp $
# --
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU AFFERO General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
@mbeijen
mbeijen / disabled.yml
Created November 14, 2012 09:59
disabled CPAN smoker files
---
comment: "no Acme stuff"
match:
distribution: "/Acme-"
disabled: 1
---
comment: "no plugin bundles"
match:
distribution: "PluginBundle"
disabled: 1
Microsoft (R) Program Maintenance Utility Version 9.00.21022.08
Copyright (C) Microsoft Corporation. All rights reserved.
C:\perl\bin\perl.exe myld link -out:blib\arch\auto\DBD\mysql\mysql.dll -dll -nologo -nodefaultlib -debug -opt:ref,icf -libpath:"c:\perl\lib\CORE" -machine:x86 "/manifestdependency:type='Win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'" dbdimp.obj mysql.obj C:\perl\lib\CORE\perl516.lib c:\Progra~1\MICROS~1.0\VC\LIB\oldnames.lib "C:\Program Files\Microsoft SDKs\Windows\v6.0A\lib\kernel32.lib" "C:\Program Files\Microsoft SDKs\Windows\v6.0A\lib\user32.lib" "C:\Program Files\Microsoft SDKs\Windows\v6.0A\lib\gdi32.lib" "C:\Program Files\Microsoft SDKs\Windows\v6.0A\lib\winspool.lib" "C:\Program Files\Microsoft SDKs\Windows\v6.0A\lib\comdlg32.lib" "C:\Program Files\Microsoft SDKs\Windows\v6.0A\lib\advapi32.lib" "C:\Program Files\Microsoft SDKs\Windows\v6.0A\lib\shell32.lib" "C:\Program Files\Micros
#!/usr/bin/perl
# --
# bin/otrs.SetCustomerPassword.pl - Changes or Sets password for a customer
# Copyright (C) 2001-2013 OTRS AG, http://otrs.com/
# --
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU AFFERO General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# any later version.
#
@mbeijen
mbeijen / otrs.AddCustomer2Group.pl
Created September 9, 2013 05:48
Script to add customers to customer groups.
#!/usr/bin/perl
# --
# bin/otrs.AddCustomer2Group.pl - Add Customer to a Group
# Copyright (C) 2001-2013 OTRS AG, http://otrs.com/
# --
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU AFFERO General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# any later version.
#