Simple collection of Groovy scripts to help me maintain some Jenkins systems.
See also https://wiki.jenkins-ci.org/display/JENKINS/Jenkins+Script+Console
Please comment & let me know if you have a fork / fixes you'd like to include.
Simple collection of Groovy scripts to help me maintain some Jenkins systems.
See also https://wiki.jenkins-ci.org/display/JENKINS/Jenkins+Script+Console
Please comment & let me know if you have a fork / fixes you'd like to include.
https://mermaid.js.org/syntax/block.html
block-beta
columns 4
rect1["Rectangle ❤"]
rounded1("Rounded edges")
sub1[["Subroutine"]]
db1[("Database")]
circle1(("Circle"))
Enable memberOf attribute on an openldap server.
Source: https://www.brianshowalter.com/blog/installing-configuring-openldap
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 |
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 |
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
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 | |
------------ |
#!/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 |
# 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 |