This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
group_attrs = ["name", "member"] | |
group_base = "<%= @ldap_linux_groupbase -%>" | |
user_filter = Net::LDAP::Filter.present("sAMAccountName") | |
user_attrs = ["sAMAccountName"] | |
ldap.search(:base => group_base, :filter => group_filter, :attributes => group_attrs) do |group| | |
if mapping[group.name.first] | |
groupright = mapping[group.name.first] | |
group.member.each do |member| | |
ldap.search(:base => member, :filter => user_filter, :attributes => user_attrs) do |user| | |
if !rights[user.sAMAccountName.first] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
REWRITTEN_WORKING_COPY_DIR=/tmp/hiera | |
git pull $REWRITTEN_WORKING_COPY_DIR--allow-unrelated-histories | |
git push --force origin HEAD:production |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
PREFIX=data | |
SQL=/tmp/rewrite-history.sql | |
:>$SQL | |
git filter-branch \ | |
--index-filter ' | |
git ls-files -s | | |
sed "s,\t,&'"$PREFIX"'/," | | |
GIT_INDEX_FILE=$GIT_INDEX_FILE.new git update-index --index-info && |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#/bin/bash | |
entrydir=/tmp/rss-entries | |
xmlstarlet sel -t -m "//item/title" -v . -n $1 | while read title; do | |
entryhash=$(echo $title | md5sum | awk '{print $1}') | |
xmlstarlet sel -t -m "//item[title='$title']" -c . $1 > $entrydir/$entryhash | |
done |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# HTTP server for redirects only | |
server { | |
server_name www.incertum.net incertum.net www.stefan-foerster.de stefan-foerster.de; | |
listen 80 default_server; | |
listen [::]:80 ipv6only=on default_server; | |
return 301 https://$host$request_uri; | |
} | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# lists.example.net definition | |
server { | |
server_name lists.example.net; | |
listen 80; | |
listen [::]:80; | |
root /var/www/lists; | |
index index.html; | |
access_log /var/log/nginx/access-lists.example.net.log; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ssh -o "VerifyHostKeyDNS ask" thrassa.incertum.net | |
The authenticity of host 'thrassa.incertum.net (78.47.238.19)' can't be established. | |
RSA key fingerprint is 13:0f:0e:4e:2c:1a:ab:5d:55:55:2a:86:37:93:7e:b9. | |
**Matching host key fingerprint found in DNS.** | |
Are you sure you want to continue connecting (yes/no)? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[gallery3] | |
user = vhost-user | |
group = vhost-group | |
listen = /tmp/gallery3-example-com.sock | |
listen.group = www-data | |
listen.mode = 0660 | |
pm = dynamic | |
pm.max_children = 5 | |
pm.min_spare_servers = 1 |