Skip to content

Instantly share code, notes, and snippets.

@t-chab
t-chab / httpd.conf
Last active May 4, 2016 13:25
Apache forward proxy sample config. TODO : https support
ServerRoot "/path/to/server/root"
LoadModule authz_host_module modules/mod_authz_host.so
LoadModule authz_core_module modules/mod_authz_core.so
LoadModule headers_module modules/mod_headers.so
LoadModule proxy_module modules/mod_proxy.so
LoadModule proxy_http_module modules/mod_proxy_http.so
LoadModule proxy_connect_module modules/mod_proxy_connect.so
LoadModule log_config_module modules/mod_log_config.so
LoadModule ssl_module modules/mod_ssl.so
@t-chab
t-chab / .fonts.conf
Created November 11, 2014 13:14
Nice fonts for Firefox with KDE
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
<match target="font">
<edit mode="assign" name="rgba">
<const>none</const>
</edit>
</match>
<match target="font">
<edit mode="assign" name="hinting">
@t-chab
t-chab / before.rules
Created November 13, 2014 18:21
ufw rule to add at the end of /etc/ufw/before.rules on Debian to allow LXC bridged interfaces to work (before COMMIT)
# Allow traffic on bridged interface
-I FORWARD -m physdev --physdev-is-bridged -j ACCEPT
@t-chab
t-chab / temp.sh
Created November 18, 2014 05:54
Shell script which log temperature to a temp file
#!/usr/bin/env sh
# sensors, hddtemp and nvidia-smi commands should be in path
CORE0_TEMP=$(sensors | grep 'Core 0' | awk -F':' '{print $2}' | awk -F'(' '{print $1}' |tr -d ' +')
CORE1_TEMP=$(sensors | grep 'Core 1' | awk -F':' '{print $2}' | awk -F'(' '{print $1}' |tr -d ' +')
HDD_TEMP=$(hddtemp /dev/sdb |awk '{ print $3}')
GPU_TEMP=$(nvidia-smi -a |grep "GPU Current Temp" |awk '{ print $5}')
OUT_FILE=/tmp/$(date +%Y-%m-%d).temp.log
@t-chab
t-chab / http-reverse-proxy.conf
Created November 18, 2014 16:24
Apache reverse proxy sample configuration
ServerRoot "/opt/httpd-proxy"
LoadModule alias_module modules/mod_alias.so
LoadModule authz_host_module modules/mod_authz_host.so
LoadModule headers_module modules/mod_headers.so
LoadModule proxy_module modules/mod_proxy.so
LoadModule proxy_http_module modules/mod_proxy_http.so
LoadModule proxy_connect_module modules/mod_proxy_connect.so
LoadModule rewrite_module modules/mod_rewrite.so
LoadModule log_config_module modules/mod_log_config.so
set-option -g lock-command "vlock"
unbind ^X
bind ^X lock-server
unbind x
bind x lock-server
@t-chab
t-chab / Dockerfile
Last active January 12, 2022 18:31
telegram-bot Dockerfile, with youtube download plugin
FROM debian:latest
MAINTAINER [email protected]
# install app
#############
# install app from official repos, set perms, cleanup
# User telegramd is added manually to force uid to 5000, to avoid perms problems
RUN groupadd -r -g 5000 telegramd && \
@t-chab
t-chab / options.sh
Created July 7, 2015 13:12
Java JMX remote monitoring JVM option
export JAVA_OPTS="-Dcom.sun.management.jmxremote.authenticate=false\
-Dcom.sun.management.jmxremote.port=XXXX\
-Dcom.sun.management.jmxremote=true\
-Dcom.sun.management.jmxremote.ssl=false"
@t-chab
t-chab / update.sh
Last active August 29, 2015 14:24
Simple shell script to rebuild and upgrade AUR packages
#!/usr/bin/env bash
PKG_LIST=$(pacman -Qm |awk '{ print $1}' |tr '\n' ' ')
WORK_DIR="$(mktemp -d)"
for i in $PKG_LIST
do
echo "Building package $i in $WORK_DIR/$i"
cd $WORK_DIR
prefix=$(echo ${i:0:2})
smbclient -N //IP.OF.SAMBA.SERVER/sharedFolder/ -U% -c ls