Skip to content

Instantly share code, notes, and snippets.

View ofurkusi's full-sized avatar

Palmar Thorsteinsson ofurkusi

  • Iceland
View GitHub Profile
@ofurkusi
ofurkusi / ldap3-ad-auth.py
Created June 10, 2024 12:54
Using the ldap3 package to authenticate against an Active Directory service in Python
from ldap3 import Server, Connection, NTLM, SUBTREE
# Hostname of your Active Directory (AD, LDAP) Server
LDAP_HOST = 'ad.example.com'
LDAP_PORT = 636
LDAP_USE_SSL = True
# The base DN of your LDAP directory (DNS of the domain)
LDAP_BASE_DN = 'dc=example,dc=com'
@ofurkusi
ofurkusi / centos-9-stream-docker-compose.md
Created December 22, 2021 12:52
Using docker-compose on CentOS Stream 9

Using docker-compose on CentOS Stream 9

Having decided on a RedHat based distro for my new home server, I was originally decided on using RockyLinux. When CentOS Stream 9 came out however, and having softened up on the idea behind CentOS Stream, I decided to give it a try.

A few issues getting things up and running

It wasn't all moonlight and roses though. My first attempt at installing CentOS Stream 9 was a failure apparantly because I had only allocated 500MiB to the /boot partition. The error wasn't very helpful:

DNF error: Error in POSTTRANS scriptlet in rpm package kernel-core
@ofurkusi
ofurkusi / UDL_Markdown.xml
Last active September 12, 2018 15:42
Markdown syntax highlighting for Notepad++
<NotepadPlus>
<UserLang name="Markdown" ext="md markdown" udlVersion="2.1">
<Settings>
<Global caseIgnored="no" allowFoldOfComments="no" foldCompact="no" forcePureLC="2" decimalSeparator="0" />
<Prefix Keywords1="yes" Keywords2="yes" Keywords3="yes" Keywords4="yes" Keywords5="yes" Keywords6="no" Keywords7="no" Keywords8="no" />
</Settings>
<KeywordLists>
<Keywords name="Comments">00%% 01 02 03% 04((EOL))</Keywords>
<Keywords name="Numbers, prefix1"></Keywords>
<Keywords name="Numbers, prefix2"></Keywords>
@ofurkusi
ofurkusi / UDL_TodoTxt.xml
Created October 14, 2016 14:27
Todo.txt syntax highlighting for Notepad++
<NotepadPlus>
<UserLang name="Todo.txt" ext="Todo.txt" udlVersion="2.1">
<Settings>
<Global caseIgnored="yes" allowFoldOfComments="no" foldCompact="no" forcePureLC="2" decimalSeparator="0" />
<Prefix Keywords1="yes" Keywords2="yes" Keywords3="no" Keywords4="no" Keywords5="no" Keywords6="no" Keywords7="no" Keywords8="no" />
</Settings>
<KeywordLists>
<Keywords name="Comments">00x 01 02((EOL)) 03 04</Keywords>
<Keywords name="Numbers, prefix1"></Keywords>
<Keywords name="Numbers, prefix2"></Keywords>
@ofurkusi
ofurkusi / r-building-packages-win.md
Last active February 12, 2021 15:50
Building R packages on Windows without administrator access