Skip to content

Instantly share code, notes, and snippets.

@TacoSteemers
TacoSteemers / gist:5378038
Last active December 16, 2015 04:38
Adding author name/link to WP Vintage Camera theme. content.php for main page, and content-single.php for the one post view
Just before the tags:
...
<footer class="entry-meta">
<?php if ( 'post' == get_post_type() ) : // Hide category and tag text for pages on Search ?>
<span>Written by: <?php the_author_link(); ?></span>
...
or just before the date:
@TacoSteemers
TacoSteemers / cleanup.py
Created April 1, 2013 14:35
Small scipy/numpy/pyplot script to clean up a monochrome drawing and show the input and output side by side
import numpy
from scipy import misc
import matplotlib.pyplot as plt
if __name__ == "__main__":
input = 'input.png'
output = 'output.png'
# Editing
imIn = misc.imread(input)
@TacoSteemers
TacoSteemers / minimal_fork_test.c
Created October 23, 2012 19:10
Minimal Linux and Windows process spawn test
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#ifdef _WIN32
#include <process.h> /* Required for _spawnv */
#include <windows.h>
/* We make getpid() work in a similar
way on Windows as it does on Linux */
#define getpid() GetCurrentProcessId()
#endif
@TacoSteemers
TacoSteemers / gist:11060507
Last active August 29, 2015 14:00
backuppc installation
In my setup, /var/lib/backuppc is a soft link to a directory on a different filesystem, lets say /backup
Problem one: could not start the service
Solved by setting
chmod g+s /backup
chown -R backuppc /backup
Problem two: web interface would not come up
Solved by running (as root):