Skip to content

Instantly share code, notes, and snippets.

View tychoish's full-sized avatar

Sam Kleinman tychoish

View GitHub Profile
[216864.744]
X.Org X Server 1.14.4
Release Date: 2013-10-31
[216864.744] X Protocol Version 11, Revision 0
[216864.744] Build Operating System: Linux 3.11.6-1-ARCH x86_64
[216864.744] Current Operating System: Linux bakhtin 3.10.21-1-lts #1 SMP Sat Nov 30 08:31:59 CET 2013 x86_64
[216864.744] Kernel command line: BOOT_IMAGE=/vmlinuz-linux-lts root=/dev/mapper/bakhtinvg0-root rootfstype=ext4 rw rootflags=rw,relatime,data=ordered cgroup_disable=memory
[216864.744] Build Date: 01 November 2013 05:10:48PM
[216864.744]
[216864.744] Current version of pixman: 0.32.4
[main]
host = https://www.transifex.com
type = PO
[mongodb-manual.installation]
file_filter = translation/<lang>/LC_MESSAGES/installation.po
source_file = translation/pot/installation.pot
source_lang = en
[mongodb-manual.about]
@tychoish
tychoish / argparse_example.py
Last active August 29, 2015 13:55
Python State Object Classes
import argparse
def collect_arguments():
parser = argparse.ArgumentParser()
parser.add_argument('--version')
args = ConfigArgs()
return parser.parse_args(namespace=args)
(defun smart-grep ()
(interactive)
(let ((search-text (buffer-substring-no-properties (region-beginning) (region-end)))
(file buffer-file-name))
(let ((search-dir (concat (substring file 0 (search "/src/" file)) "/src/"))
(search-extension (concat "*." (file-name-extension file))))
(rgrep search-text search-extension search-dir))))
title: Enable authentication on each component in the cluster.
stepnum: 2
ref: enable-auth
pre:
Enable authentication by specifying the key file on each
:program:`mongos` and :program:`mongod` in the cluster, including each
config server and shard. On each, specify the key file by doing one of
the following:
action:
- heading: Specify the key file in the configuration file.
class ConfObj(ConfigurationBase):
@property
def sources(self):
return self.state['sources']
@sources.setter
def sources(self, value):
self.state['source'] = SourceConfig(value)
def get_path(conf, branch):
o = []
if conf.project.name in ['mms', 'meta-driver']:
o.append(conf.project.tag)
if branch == conf.git.branches.manual:
if conf.project.name in ['mms', 'meta-driver']:
if conf.project.name == 'mms' and 'edition' in conf.project:
if conf.project.edition == 'saas':
source/core/gridfs.txt:13: ERROR: Too many autonumbered footnote references: only 0 corresponding footnotes available.
source/core/gridfs.txt:13: ERROR: Unknown target name: "default-chunk-size-change".
source/reference/command/geoNear-field.rst:105: SEVERE: Problems with "include" directive path:
source/reference/command/geoNear-field.rst:105: SEVERE: Problems with "include" directive path: source/includes/deprecation-uniqueDocs.rst
source/reference/command/geoNear-field.rst:147: SEVERE: Problems with "include" directive path:
source/reference/command/geoNear-field.rst:147: SEVERE: Problems with "include" directive path: source/includes/fact-geoNear-restrict-near-in-query.rst
source/reference/command/geoNear-field.rst:181: SEVERE: Problems with "include" directive path:
source/reference/command/geoNear-field.rst:181: SEVERE: Problems with "include" directive path: source/includes/deprecation-uniqueDocs.rst
source/reference/command/geoNear-field.rst:63: SEVERE: Problems with "include" directive path:
source/r
@tychoish
tychoish / epistle-linker
Last active August 29, 2015 14:07
Epistle Linker
I've been using [Epistle](http://kooklab.com/epistle.html) for writing
on my Android devices and while I adore the software there are a
couple of significant limitations. Notably that all files need to be
in one directory with no hierarchy and that all files need to have
`.txt` extensions. I have pretty good file organization in a number of
git repositories, and I don't use the `.txt` extension at all. hile
Epistle is *great*, I needed a way to integrate it with my current
system without causing a nightmare.
Luckily the command line Linux dropbox program recognizes symbolic

Novel Makefile

Background

This makefile-based build system provides a bit of extra gloss/configuration for using Sphinx and sffms to build conventional manuscripts and websites for novel-like hypertexts.

Usage Notes