Skip to content

Instantly share code, notes, and snippets.

@ziz
ziz / AO3-split-chapters.jsx
Created November 25, 2022 03:15
AO3 Chapter Splitter by Lara
/*
AO3 Chapter Splitter
Written by Lara in November 2020 for Adobe InDesign CC 2019
Version 1.0
Splits AO3 stories by chapter and bookmarks the beginning of each chapter.
Based in part on StorySplitter by FourAces, Naomi Kennedy and Chris Jennings
@ziz
ziz / keybase.md
Last active November 11, 2016 17:28

Keybase proof

I hereby claim:

  • I am ziz on github.
  • I am devesine (https://keybase.io/devesine) on keybase.
  • I have a public key ASA7eauZ0tgK-8KxaSPJbpibG0CHaR2fVUbzgpFXlTTN3go

To claim this, I am signing this object:

@ziz
ziz / Strip Trailing Whitespace (Modified Lines) on Save.tmCommand
Created December 5, 2013 19:46
TextMate 2 bundle command to strip trailing whitespace from (only) modified lines on save. Released under the MIT license <http://opensource.org/licenses/MIT> - caveat hacker.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>command</key>
<string>#!/usr/bin/env bash
[[ -f "${TM_SUPPORT_PATH}/lib/bash_init.sh" ]] &amp;&amp; . "${TM_SUPPORT_PATH}/lib/bash_init.sh"
if [[ ! -e "$TM_FILEPATH" ]]; then
sed -E 's/[[:space:]]*$//'
@ziz
ziz / innobackupex-restore.sh
Created October 18, 2012 20:56 — forked from dalecaru/innobackupex-restore.sh
Scripts to create and restore full and incremental backups (for all databases on server) using innobackupex from Percona.
#!/bin/sh
#
# Script to prepare and restore full and incremental backups created with innobackupex-runner.
#
# This script is provided as-is; no liability can be accepted for use.
#
INNOBACKUPEX=innobackupex-1.5.1
INNOBACKUPEXFULL=/usr/bin/$INNOBACKUPEX
TMPFILE="/tmp/innobackupex-restore.$$.tmp"
#!/bin/bash
echo $1;
while shift; do
echo $1;
done
@ziz
ziz / com.zizproductions.setdns.plist
Created June 14, 2012 18:13
Add local dnsmasq to host resolver order
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>com.zizproductions.setdns</string>
<key>ProgramArguments</key>
<array>
<string>/usr/local/bin/setdns.sh</string>
</array>
NameVirtualHost *:80
<Directory "/Users/YOURNAME/Sites/">
Options Indexes MultiViews FollowSymLinks Includes
AllowOverride All
Order allow,deny
Allow from all
</Directory>
<VirtualHost *:80>
@ziz
ziz / httpd.conf.diff
Created June 14, 2012 17:14
Enabling PHP and SSL on OS X Lion
--- default-httpd.conf 2012-06-14 11:07:02.000000000 -0600
+++ /etc/apache2/httpd.conf 2012-03-21 10:57:18.000000000 -0600
@@ -92,7 +92,7 @@
LoadModule proxy_http_module libexec/apache2/mod_proxy_http.so
LoadModule proxy_scgi_module libexec/apache2/mod_proxy_scgi.so
LoadModule proxy_balancer_module libexec/apache2/mod_proxy_balancer.so
-#LoadModule ssl_module libexec/apache2/mod_ssl.so
+LoadModule ssl_module libexec/apache2/mod_ssl.so
LoadModule mime_module libexec/apache2/mod_mime.so
LoadModule dav_module libexec/apache2/mod_dav.so
;;; spelling checker
;;; This lets you type ESC-s to check the spelling of the current line.
;;; If any misspellings are found, you will be told.
;;; This requires the "spell" utility on your local system.
/loaded __TFLIB__/spell.tf
/def -i spell_line = \
/setenv ARGS=$(/recall -i 1)%; \
/let _errs=$(/quote -S -decho !echo $$ARGS | aspell list)%; \
"""
This fabric file makes setting up and deploying a django application much
easier, but it does make a few assumptions. Namely that you're using Git,
Apache and mod_wsgi and your using Debian or Ubuntu. Also you should have
Django installed on your local machine and SSH installed on both the local
machine and any servers you want to deploy to.
_note that I've used the name project_name throughout this example. Replace
this with whatever your project is called._