Skip to content

Instantly share code, notes, and snippets.

@dnozay
dnozay / _Jenkins+Script+Console.md
Last active May 3, 2024 09:33
jenkins groovy scripts collection.
@dnozay
dnozay / block-beta.md
Last active March 1, 2024 17:38
Mermaid cheatsheet
@dnozay
dnozay / README.md
Last active February 23, 2024 15:06
Enable memberOf attribute on an openldap server.
@dnozay
dnozay / LICENSE
Created December 19, 2017 20:07
Datetime utilities extracted from Django code as a single module.
Copyright (c) Django Software Foundation and individual contributors.
All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
@dnozay
dnozay / My Exiftool Cheatsheet.md
Last active November 12, 2023 15:48 — forked from rjames86/My Exiftool Cheatsheet.md
Cheatsheet for image / video metadata manipulation.

Cheatsheet for image / video metadata manipulation.

Last updated 2019-07-24

Disclaimer

until more specific license...

THE CONTENT BELOW IS PROVIDED "AS-IS",
WE DISCLAIM LIABILITY FOR ALL USES TO THE FULLEST EXTENT PERMITTED BY APPLICABLE LAW.
@dnozay
dnozay / README
Created February 28, 2014 02:05
nginx + php-fpm + x-accel-redirect + ldap
install the packages
# yum install php-fpm php-ldap
then make sure php-fpm can create sessions
and change user and group to be nginx
see /etc/php-fpm.d/www.conf for more details
# sed -i -e 's/apache/nginx/g' /etc/php-fpm.d/www.conf
# sed -i -e 's/;catch_workers_output = yes/catch_workers_output = yes/' /etc/php-fpm.d/www.conf
@dnozay
dnozay / README.md
Last active May 31, 2023 02:12
Collection of useful stuff for interacting with gitlab.

Reset root/admin password

Lost the root/admin password? You can reset it using the command-line. Recipe adapted from gitlab issue #308.

# start the console
sudo gitlab-rails console
@dnozay
dnozay / README
Last active January 20, 2023 19:42
syslog (port 10514) firewall configuration for vSphere
goal
----
The goal is send syslog traffic to a remote host and use unpriviledged ports;
so that I can have my logstash (http://logstash.net/) server not need to
run as root. On vSphere 5.1, tcp 1514 is covered by the syslog rule, but
in my case udp is preferred.
installation
------------
@dnozay
dnozay / my-pagerduty-incidents.py
Created October 19, 2022 21:12
Very small script to list my pagerduty incidents using pdpyras
#!/usr/bin/env python
# Very small script to list my pagerduty incidents,
# useful to give a quick report about my oncall shift.
#
# https://github.com/PagerDuty/pdpyras
import os
import pdpyras
import dateutil.parser
import pytz
@dnozay
dnozay / procname.py
Created December 29, 2011 20:59
set/get process name (using ctypes & prctl)
# set/get process name (using ctypes & prctl)
# set_proc_name('python rocks')
# name = get_proc_name()
import ctypes
from ctypes.util import find_library
libc = ctypes.CDLL(find_library('c'))
PR_SET_NAME = 15
PR_GET_NAME = 16