Skip to content

Instantly share code, notes, and snippets.

@dajare
dajare / .bashrc
Last active October 6, 2015 02:18
My .bashrc file
# ALIASES
####################
alias asaph='java -ea -jar ~/.bin/asaph/asaph.jar'
alias addfonts='sudo fc-cache -f -v'
alias bru='qmv -f do'
alias ps='ps auxf'
alias pg='ps aux | grep'
alias version='lsb_release -dc && echo "Desktop: $DESKTOP_SESSION" && uname -a'
@dajare
dajare / class.general.php
Created November 21, 2012 08:36
Symphony 1.7.0.1 /symphony/lib/core/class.general.php
<?php
###
#
# Symphony web publishing system
#
# Copyright 2004 - 2006 Twenty One Degrees Pty. Ltd. This code cannot be
# modified or redistributed without permission.
#
# For terms of use please visit http://21degrees.com.au/products/symphony/terms/
@dajare
dajare / .vimrc
Last active December 14, 2015 10:39
My (very basic) .vimrc file.
set nocompatible " don't use plain vi!
set modelines=0 " security measure
syntax on
set encoding=utf-8
set formatoptions+=1 " sets wordwrap at spaces
set lbr
set background=dark
colorscheme solarized
@dajare
dajare / xmlQuery.php
Last active December 18, 2015 05:59
Code for querying XML file
<?php // for Wolf CMS: save in page /xml-query
<p>Result from LexicalIndex.xml residing on Github:</p>
<?php
if (isset($_POST['search'])){
$searchcriteria = $_POST['search'];
if($searchcriteria != NULL) {
// $this->includeSnippet('sitesearch');
$hebSearch = mb_convert_encoding($_POST['search'], 'UTF-8', 'UTF-8');
@dajare
dajare / dajaregistio001.md
Created August 19, 2013 09:41
Because I Can

Because

He was not Mr Wentworth, the former curate of Monkford, however suspicious appearances may be, but a Captain Frederick Wentworth, his brother, who being made commander in consequence of the action off St Domingo, and not immediately employed, had come into Somersetshire, in the summer of 1806; and having no parent living, found a home for half a year at Monkford.

That was one long sentence. Don't blame me, though. Blame Jane Austen.

Jane Austen portrait

More

@dajare
dajare / tbBreadcrumbs.php
Created September 8, 2013 21:18
Converts the breadcrumbs code from Wolf CMS's default function for use with Bootstrap's breadcrumbs component
<ul class="breadcrumb">
<?php // for use with Twitter Bootstrap breadcrumbs component
$explode = explode("&raquo;</span>", $this->breadcrumbs('&raquo;'));
foreach ($explode as $key => $val) {
$val = preg_replace("/<span[^>]+\>/i", "", $val);
$val = str_replace("</span>", "", $val);
$pattern = '#<a href="(.+)" title="(.+)">#';
@dajare
dajare / yal-edi-grp-2016.md
Last active January 13, 2016 13:30
Yale-Edinburgh Group, 2016 meeting

on the History of the Missionary Movement and World Christianity

Consultations sponsored by the Centre for the Study of World Christianity at the University of Edinburgh, Yale Divinity School, and the Overseas Ministries Study Center

Information re. June 23-25, 2016 meeting in Edinburgh

@dajare
dajare / rss2atom.xslt.xml
Created May 31, 2012 16:10
Convert RSS xml file to Atom format
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/>
<xsl:template match="channel">
<xsl:element name="feed" namespace="http://purl.org/atom/ns#" >
<xsl:attribute name="version">0.3</xsl:attribute>
<xsl:element name="title" namespace="http://purl.org/atom/ns#">
<xsl:value-of select="*[local-name()='title']" />
</xsl:element>
@dajare
dajare / StraightQuotes2CurlyQuotes.bas
Last active September 3, 2016 15:23
LibreOffice Macro - straight quotes to curly
sub StraightQuotes2CurlyQuotes
' Thanks to Tintazul for refinements
' https://gist.github.com/Tintazul/deb5e137cabf86ddf4c2
' Now updated to work with LibreOffice Writer Version: 5.0.x
rem ----------------------------------------------------------------------
rem define variables
dim document as object
dim dispatcher as object
dim undo as object
@dajare
dajare / dajaregistio002.md
Last active September 12, 2016 08:20
Day and Night

It's all about the Sun

When the earth faces towards the sun, that part of the sun has "daytime". The part of the earth facing away from the sun will have "night".

Sun lights the earth

The earth is shaped like a ball:

Spinning globe