Skip to content

Instantly share code, notes, and snippets.

View graugans's full-sized avatar

Christian Ege graugans

View GitHub Profile
@allixsenos
allixsenos / phabricator-map-accounts-to-LDAP.sql
Last active March 11, 2018 13:15
This query will create LDAP mappings for all accounts that don't have them. Useful for migrating from Phacility to self-hosted using LDAP as the only auth method.
USE phabricator_user;
-- create LDAP mappings for unmapped users
-- this query uses a subselect due to the way MySQL reacts to UUID() being
-- wrapped in REPLACE() (returns the same UUID for all rows)
-- WARNING: make sure user.userName maps to LDAP usernames, otherwise
-- user_externalaccount.accountID needs to be modified for those users
-- where it doesn't. alternatively, use Phabricator's change username
-- utility in People app to change those users' usernames before running
INSERT INTO user_externalaccount
@jsolid
jsolid / MyMailMessage.cpp
Last active May 23, 2020 03:55
POCO library: Calling from .cpp
/**
* @name EmailInbound (Mail Message Handler for POCO)
* @description Receive and sort emails
*/
#include "MyMailMessage.h"
/**
* POCO::Net::MailMessage
*/