Skip to content

Instantly share code, notes, and snippets.

View saschafoerster's full-sized avatar

Sascha Foerster saschafoerster

View GitHub Profile
@spalladino
spalladino / mysql-docker.sh
Created December 22, 2015 13:47
Backup and restore a mysql database from a running Docker mysql container
# Backup
docker exec CONTAINER /usr/bin/mysqldump -u root --password=root DATABASE > backup.sql
# Restore
cat backup.sql | docker exec -i CONTAINER /usr/bin/mysql -u root --password=root DATABASE
@jjeaton
jjeaton / .gitignore
Created August 5, 2015 01:54
WordPress root .gitignore. Ignore everything and then opt-in (exclude from the ignore) for your custom code.
# This is a template .gitignore file for git-managed WordPress projects.
#
# Fact: you don't want WordPress core files, or your server-specific
# configuration files etc., in your project's repository. You just don't.
#
# Solution: stick this file up your repository root (which it assumes is
# also the WordPress root directory) and add exceptions for any plugins,
# themes, and other directories that should be under version control.
#
# See the comments below for more info on how to add exceptions for your
@zottto
zottto / .htaccess
Last active November 14, 2016 10:48
Passwortschutz für WP-Admin-Bereich
# Beispiel-Datei für WP-Passwortschutz
# https://www.wp-sicherheit.info
# Marc Nilius, [email protected]
# Absicherung der wp-login.php
# Der Zugriff eines nicht-eingeloggten benutzers aucf /wp-admin
# leitet auch auf die wp-login.php weiter, so dass hiermit
# alles abgesichert ist
#
# Den Pfad zur .htpasswd entsprechend anpassen
@saschafoerster
saschafoerster / TweetSongViaTweetbot.applescript
Last active January 12, 2018 21:51 — forked from romainbriche/TweetViaTweetbot.applescript
Put this script into ~/Library/iTunes/Scripts and tweet your songs via Tweetbot
-- TweetSongViaTweetbot.applescript
-- Copy title, artist, album and year of playing song from iTunes to Tweetbot
-- Author: Sascha Foerster
-- based on script from: Romain Briche
-- iTunes and Tweetbot active?
tell application "System Events"
if not (exists application process "Tweetbot") or not (exists application process "iTunes") then
display alert "iTunes and Tweetbot required" message "You have to launch iTunes and Tweetbot before executing script"
end if
@saschafoerster
saschafoerster / zoteroSF.csl
Last active April 9, 2017 17:09
zoteroSF - Zitierstil für Geisteswissenschaftler
<?xml version="1.0" encoding="utf-8"?>
<style xmlns="http://purl.org/net/xbiblio/csl" version="1.0" class="note" default-locale="de-DE">
<!--
================================================================================
INFORMATIONEN ZUM ZITIERSTIL
================================================================================
-->
<info>
<title>Sascha Foerster - Geisteswissenschaft (German)</title>
<title-short>zoteroSF</title-short>