Skip to content

Instantly share code, notes, and snippets.

@ootput
ootput / gist:2989397
Created June 25, 2012 15:53
FreeBSD - /usr/local/etc/rc.d/couchpotato
#!/bin/sh
#
# PROVIDE: couchpotato
# REQUIRE: DAEMON sabnzbd
# KEYWORD: shutdown
#
# Add the following lines to /etc/rc.conf.local or /etc/rc.conf
# to enable this service:
#
# couchpotato_enable (bool): Set to NO by default.
@ootput
ootput / extract.css
Created June 14, 2012 04:09
Extract CSS for Wordpress blog
/* HTML5 display-role reset for older browsers */
article, aside, details, figcaption, figure,
footer, header, hgroup, menu, nav, section {
display: block;
}
body {
line-height: 1;
}
ol, ul {
list-style: none;
@ootput
ootput / gist:1610595
Created January 14, 2012 07:19
FreeBSD rc script for SickBeard
#!/bin/sh
#
# From http://sickbeard.com/forums/viewtopic.php?f=3&t=358
# PROVIDE: sickbeard
# REQUIRE: sabnzbd
# KEYWORD: shutdown
#
# Add the following lines to /etc/rc.conf.local or /etc/rc.conf
# to enable this service:
#
@ootput
ootput / noarchive.patch
Created October 6, 2011 11:54
patch metaseo for no-cache meta for robots
--- metaseo.plugin.php 2011-10-06 18:54:14.326378049 +0800
+++ metaseo.plugin.php-nocache 2011-10-06 18:53:37.566385150 +0800
@@ -69,10 +69,13 @@
'home_keywords' => $home_keys,
'home_index' => true,
'home_follow' => true,
+ 'home_cache' => true,
'posts_index' => true,
'posts_follow' => true,
+ 'posts_cache' => true,
@ootput
ootput / gist:1249888
Created September 29, 2011 03:00
smb.conf
[global]
workgroup = MASTER.LIT
netbios name = SMB_PDC
server string = Descartes
interfaces = re0
log file = /var/log/samba/log.%m
max log size = 50
domain logons = Yes
os level = 65
preferred master = Yes
@ootput
ootput / gist:1249881
Created September 29, 2011 02:57
sysctl.conf for Samba
## Tweaks for Samba
kern.ipc.maxsockbuf=16777216
kern.ipc.nmbclusters=32768
kern.ipc.somaxconn=32768
kern.maxfiles=65536
kern.maxfilesperproc=32768
kern.maxvnodes=800000
net.inet.tcp.delayed_ack=0
net.inet.tcp.inflight.enable=0
net.inet.tcp.path_mtu_discovery=0
@ootput
ootput / clean_ports.sh
Created September 29, 2011 02:55
Clean FreeBSD Ports' work directories
#!/bin/sh
#
# Search for ports that contain a "work" subdirectory,
# then go into that port directory and perform a
# make clean
for i in `find /usr/ports -name work -type d`
do
cd `echo "$i" | sed 's/\/[^\/]*$/\//'`
make clean
@ootput
ootput / default
Created January 10, 2011 04:51
PXELINUX.CFG/Default
DEFAULT vesamenu.c32
MENU TITLE PXEBOOT MENU
#LABEL menu
#MENU HIDE
#KERNEL menu.c32
# Entries for local boots
LABEL -
MENU LABEL Local:
Subject: Cron <root@localhost> test -x /usr/sbin/anacron || ( cd / && run-parts --report
/etc/cron.monthly )
/etc/cron.monthly/vrms:
Non-free packages installed on tolstoi
acroread Adobe Acrobat Reader: Portable Document Format file vi
acroread-data data files for acroread
acroread-dictionary-en English dictionary for for acroread
acroread-l10n-en English language package for acroread
autoload edit-command-line
zle -N edit-command-line
bindkey '^Xe' edit-command-line