Skip to content

Instantly share code, notes, and snippets.

@renejahn
renejahn / maplotlib_close.py
Created October 5, 2017 12:57
close matplotlib figures via escape button
import sys
import matplotlib.pyplot as plt
def connect_close(figure=None):
def press_key(event):
if event.key == 'escape':
plt.close('all')
sys.exit(0)
if not figure:
@petrofcikmatus
petrofcikmatus / Dockerfile
Last active June 16, 2023 08:08
Automated nginx proxy for Docker containers
FROM php:7.1-apache
RUN apt-get update \
&& apt-get install -y --no-install-recommends git zlib1g-dev libicu-dev \
&& docker-php-ext-configure intl \
&& docker-php-ext-install intl gettext zip pdo pdo_mysql \
&& a2enmod rewrite \
&& sed -i 's!/var/www/html!/var/www/web!g' /etc/apache2/sites-available/000-default.conf \
&& mv /var/www/html /var/www/web \
&& curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
@iamhenry
iamhenry / custom_modes.yaml
Last active September 17, 2025 21:20
My Roocode Custom Modes Config
customModes:
- slug: security-auditor
name: 🛡️ Security Auditor
roleDefinition: Act as an expert security researcher conducting a thorough
security audit of my codebase. Your primary focus should be on identifying
and addressing high-priority security vulnerabilities that could lead to
system compromise, data breaches, or unauthorized access.
customInstructions: >-
Follow this structured approach: