Skip to content

Instantly share code, notes, and snippets.

guedressel guedressel

  • CYLEDGE Media GmbH
  • Vienna
Block or report user

Report or block guedressel

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@guedressel
guedressel / google-drive-ocamlfuse-cache-stats
Created Sep 11, 2019
google-drive-ocamlfuse cache stats
View google-drive-ocamlfuse-cache-stats
Size (`du -a`) Path
----------------------------------------------------------------
19166316 .../.gdfuse/.../cache
517332 .../.gdfuse/.../cache/1iSEffpqIA4IMrTbHqzqpBtPXtAie9Vw9
516288 .../.gdfuse/.../cache/1kMIDRr3A_ZSgjmaRhCU-cO76R43M4Yey
514780 .../.gdfuse/.../cache/1A87e7yxr3ixhRp1QsGB3TFwM8HnMx_Op
514776 .../.gdfuse/.../cache/1mq-FOxCOJiguOsn-TkDZzjA7C-4JgFp3
514452 .../.gdfuse/.../cache/1Q8GQXRnH0DbuWgQX6JpUgyjHvDiTgaqE
514344 .../.gdfuse/.../cache/1hJlp9Sq6Pxrdlpf_1ODbkhZzJhFqWyb_
514096 .../.gdfuse/.../cache/1ss1_KZQFazZGDn0A_DmbgOFo82kr_Pwo
@guedressel
guedressel / freistilbox-d7.htaccess
Last active May 18, 2018
Freistilbox Drupal 7 .htaccess
View freistilbox-d7.htaccess
#
# Apache/PHP/Drupal settings:
#
# Protect files and directories from prying eyes.
<FilesMatch "\.(engine|inc|info|install|make|module|profile|test|po|sh|.*sql|theme|tpl(\.php)?|xtmpl)(~|\.sw[op]|\.bak|\.orig|\.save)?$|^(\.(?!well-known).*|Entries.*|Repository|Root|Tag|Template|composer\.(json|lock))$|^#.*#$|\.php(~|\.sw[op]|\.bak|\.orig\.save)$">
<IfModule mod_authz_core.c>
Require all denied
</IfModule>
<IfModule !mod_authz_core.c>
View freistilbox-deploy-check.py
#!/usr/bin/env python3
import os
import sys
import re
import argparse
from datetime import timedelta
from datetime import datetime
@guedressel
guedressel / postgres-privileges-cheat-sheet
Last active Feb 5, 2019
Boilerplate DCL statements handy for PostgreSQL databases
View postgres-privileges-cheat-sheet
CREATE DATABASE test OWNER postgres;
# connect to db test and stay connected for rest of statements in this file.
\c test
# prevent unauthorized access
REVOKE ALL ON DATABASE test FROM PUBLIC;
REVOKE ALL ON SCHEMA public FROM PUBLIC;
# create "groups" (read: ROLES)
@guedressel
guedressel / reset-sticky-group-permission.sh
Last active Jan 24, 2018
Resets permissions of a directory to have guid set on directories and everything group writable (recursively)
View reset-sticky-group-permission.sh
#!/bin/bash
find . -type d -exec chmod u=rwx,g=rwxs,o=rx {} \;
find . -type f -exec chmod g-s {} \;
View keybase.md

Keybase proof

I hereby claim:

  • I am guedressel on github.
  • I am guedressel (https://keybase.io/guedressel) on keybase.
  • I have a public key whose fingerprint is A283 E1EF 9F79 135C F85E 0A85 7D1A E15E 9E21 9A30

To claim this, I am signing this object:

@guedressel
guedressel / enable-openldap-tls.ldif
Created Apr 28, 2016
Enabling TLS support in slapd (OpenLDAP)
View enable-openldap-tls.ldif
dn: cn=config
changetype: modify
# Security - TLS section
add: olcTLSCertificateFile
olcTLSCertificateFile: /path/cert_bundle.crt
-
add: olcTLSCertificateKeyFile
olcTLSCertificateKeyFile: /path/cert.rsa.key
-
add: olcTLSDHParamFile
@guedressel
guedressel / benchmark.php
Last active Oct 1, 2015
Simple speed benchmarking utilitiy to test PHP functions for their runtime.
View benchmark.php
<?php
class Timer {
private $start = 0;
private $stop = 0;
function Timer( $start = TRUE ) {
if ( $start )
@guedressel
guedressel / nineteen.sh
Last active Sep 20, 2015 — forked from bhundven/nineteen.sh
Enlightenment 19 build script for Ubuntu/Debian
View nineteen.sh
#!/bin/bash
#
# NINETEEN.SH
# This script allows you to install/update Enlightenment 19 git version on
# Ubuntu 14.04 LTS or Debian wheezy/sid, or remove E19 git from your system.
# Originally from: http://ubuntuforums.org/showthread.php?t=2203190
# By: Philippe J. Guillaumie (batden AT sfr DOT fr).
# Additional updates by: Bryan Hundven (bryanhundven AT gmail DOT com).
#
# Tip:
@guedressel
guedressel / font-awesome-mime-type-icons.php
Last active Apr 11, 2019
Font Awesome File Icons: Mapping MIME Types to correct icon classes
View font-awesome-mime-type-icons.php
<?php
/**
* Get font awesome file icon class for specific MIME Type
* @see https://gist.github.com/guedressel/0daa170c0fde65ce5551
*
*/
function font_awesome_file_icon_class( $mime_type ) {
// List of official MIME Types: http://www.iana.org/assignments/media-types/media-types.xhtml
You can’t perform that action at this time.