Skip to content

Instantly share code, notes, and snippets.

View TimKraemer's full-sized avatar
🌴
Working on AR / VR

Tim Krämer TimKraemer

🌴
Working on AR / VR
View GitHub Profile
@frjo
frjo / contact.php
Last active January 20, 2023 07:22
PHP script for contact form
<?php
// Set the e-mail address that submission should be sent to.
$address = 'info@example.com';
// Set the e-mail subject prefix.
$prefix = 'Website feedback';
// DO NOT EDIT ANYTHING BELOW UNLESS YOU KNOW WHAT YOU ARE DOING.
@vollkorn1982
vollkorn1982 / wifionice
Created December 9, 2016 18:03
HowTo auto connect your Linux to the German Wifi on ICE trains
#!/bin/sh
# put this file in /etc/network/if-up.d/
if iwconfig wlp3s0 | grep -c "ESSID:\"WIFIonICE\""
then
curl -s "https://www.ombord.info/hotspot/hotspot.cgi?connect=&method=login&realm=db_advanced_wifi"
fi
anonymous
anonymous / config.json
Created October 8, 2015 14:55
Bootstrap Customizer Config
{
"vars": {
"@gray-base": "#000",
"@gray-darker": "#5c5c5c",
"@gray-dark": "lighten(@gray-base, 20%)",
"@gray": "lighten(@gray-base, 33.5%)",
"@gray-light": "lighten(@gray-base, 46.7%)",
"@gray-lighter": "lighten(@gray-base, 93.5%)",
"@brand-primary": "#f59c00",
"@brand-success": "#5cb85c",
@TimKraemer
TimKraemer / user-callback
Created July 20, 2015 13:19
backintime user-callback backup script
#!/usr/bin/env bash
# this file is called by backintime to handle it's current states
# see: http://backintime.le-web.org/documentation/usercallback/
MOUNT_PATH="/media/backup"
LOG_FILE="/var/log/backintime/backintime.log"
EMAIL_ADDRESS="backup@tim-kraemer.de"
LAST_READ_MARKER_PATH="/root/backup_timestamps/marker"
NAME_INDICATOR_PATH=${MOUNT_PATH}"/name_backup"
@kmatt
kmatt / delay_pg_restore_matviews
Last active January 4, 2024 18:17
Delay materialized view refresh during pg_restore
pg_dump database -Fc backup.dump
pg_restore -l backup.dump | sed '/MATERIALIZED VIEW DATA/d' > restore.lst
pg_restore -L restore.lst -d database backup.dump
pg_restore -l backup.dump | grep 'MATERIALIZED VIEW DATA' > refresh.lst
pg_restore -L refresh.lst -d database backup.dump