Skip to content

Instantly share code, notes, and snippets.

@deserted
deserted / powershell-list-of-all-entries-from-Outlook-GAL
Created January 12, 2022 23:32 — forked from constructor-igor/powershell-list-of-all-entries-from-Outlook-GAL
Powershell: list of all entries from Outlook Global Address List (GAL)
[Microsoft.Office.Interop.Outlook.Application] $outlook = New-Object -ComObject Outlook.Application
$entries = $outlook.Session.GetGlobalAddressList().AddressEntries
$count = $entries.Count
$count
foreach($entry in $entries)
{
[console]::WriteLine("{0}: {1}", $entry.Name, $entry.GetExchangeUser().MobileTelephoneNumber)
}
{
"meta": {
"theme": "elegant"
},
"awards": [],
"basics": {
"name": "Tim Allingham",
"label": "IT generalist",
"picture": "https://www.timallingham.com/images/tim-allingham.jpg",
"email": "tim@timallingham.com",
@deserted
deserted / keybase.md
Last active September 14, 2019 01:06

Keybase proof

I hereby claim:

  • I am deserted on github.
  • I am timallingham (https://keybase.io/timallingham) on keybase.
  • I have a public key ASC2WuaxkBdHhmLDuHPqw5XcKhFJwSXYiPOYogJ8Mm5t7wo

To claim this, I am signing this object:

@deserted
deserted / woo-loop-image-wrap.php
Last active July 6, 2016 01:18 — forked from krogsgard/woo-loop-image-wrap.php
WooCommerce insert wrapper around thumbnail images in loop
<?php
/* This snippet removes the action that inserts thumbnails to products in teh loop
* and re-adds the function customized with our wrapper in it.
* It applies to all archives with products.
*
* @original plugin: WooCommerce
* @author of snippet: Brian Krogsard
* Modifications by: Tim Allingham
*/
remove_action( 'woocommerce_before_shop_loop_item_title', 'woocommerce_template_loop_product_thumbnail', 10);
@deserted
deserted / Mojo.pm
Created February 7, 2016 05:28
Dynamically add site-specific static file folders with Mojolicious
$self->hook(
before_dispatch =>
sub {
my $app = shift;
unshift @{$app->static->paths}, $app->home->rel_dir('sites/'. $self->getSiteID);
}
);
$self->hook(
after_static =>
## Helper Definition
$app->helper('blog.getCategories' =>
sub {
my $self = shift;
my @cats = $self->db->resultset('BlogCategory')->all;
my @categories = map +{ id => $_->catid, name => $_->catname }, @cats; ## catid and catname both in DBIx::Class schema def
$self->app->log->debug(Dumper(\@categories));
return wantarray ? @categories : \@categories;
}
@deserted
deserted / casual-bookings.conf
Last active August 29, 2015 14:01
Upstart job for Mojolicious web app
########################################
##### casual-bookings.conf #####
##### install in /etc/init #####
########################################
description "GCC Casual Bookings web service"
env APP=/home/casual/casbookings/script/casual_bookings
setuid casual
#!/bin/bash
#
# Init file for Ping server daemon
#
# chkconfig: 2345 55 25
# description: Ping server daemon
#
# processname: ping
# pidfile: /var/run/ping.pid