Skip to content

Instantly share code, notes, and snippets.

View carlthewebmaster's full-sized avatar

Carl Leubsdorf, Jr. carlthewebmaster

View GitHub Profile
@carlthewebmaster
carlthewebmaster / Annotum2Go-preview-29-aug-README
Created August 30, 2011 02:36
Annotum2Go preview-beta initial release README
------------------------------
What is Annotum2Go?
------------------------------
Annotum2Go is a self-contained version of Annotum based on Timo Haberkern's Server2Go CD-Rom Webserver.
It also includes Firefox Portable from PortableApps
See http://annotum.wordpress.com for more info on Annotum.
See the readme-server2go.txt file for more information about Server2Go -- and please send Timo a donation
if you find it useful! The documentation is available via the 'server configuration' link after starting Annotum2Go.
@carlthewebmaster
carlthewebmaster / gist:1186992
Created September 1, 2011 19:13
WordPress Article Post Page UI Reset
Delete from `wp_usermeta` where `user_id` = 1 and `meta_key` like '%_article'
@carlthewebmaster
carlthewebmaster / gist:1187548
Created September 1, 2011 23:14
Wipe Article Editor UI Customizations
<?php
/* Other code linking to this via a button somewhere */
delete_user_meta( $user_id, 'closedpostboxes_article' ) ;
delete_user_meta( $user_id, 'screen_layout_article' ) ;
delete_user_meta( $user_id, 'metaboxhidden_article' ) ;
delete_user_meta( $user_id, 'meta-box-order_article' ) ;

This is a heading

And this is not

  • Here is
  • a list
  • of stuff
@carlthewebmaster
carlthewebmaster / initial-filtered-content.xml
Created February 1, 2012 20:50
Content initially stored in post_content_filtered after Annotum xml import, and content after first save
<sec xmlns:xlink="http://www.w3.org/1999/xlink"><title>Lorem Ipsum</title>
<p>Autem Apolloni figitur acquievit sed quod non potentiae falsa namque quaequae promittunt sed haec. Coniunx rex ut libertatem adhuc dicente sicut gaudio hoc Apollonius mihi cum. Bene accidentium in fuerat se sed quod ait Cumque hoc ait regem Boreas quam dolore. Item filiam in modo ad per animum pares terris sidera unam.<xref ref-type="bibr" rid="ref1">1</xref></p>
<p>Litus vita Apolloni codicellos pedes Dianae non ait:</p>
<p><fig><label>Ingens ferro conparuit</label><caption>
<p>Ingens ferro conparuit Tharsiam si mihi Tyrum in rei civibus unde beata quid nobis si non potentiae.<xref ref-type="bibr" rid="ref2">2</xref></p>
</caption>
<media xlink:href="https://chart.googleapis.com/chart?cht=tx&amp;chf=bg,s,FFFFFF00&amp;chco=000000&amp;chl=m(T)%20%3D%20%5Cbegin%7Bcases%7D%200%20%26%20%5Ctext%7B%24T%20%3E%20T_c%24%7D%20%5C%5C%20%5Cbigl(1%20-%20%5B%5Csinh%202%20%5Cbeta%20J%5D%5E%7B-4%7D%20%5Cbigr)%5E%7B%5C!%201%2F8%7D%20%26%20%5Ctext%7B
@carlthewebmaster
carlthewebmaster / smallerversion.php
Created February 17, 2012 01:25
Show only author's articles
// hide articles from contribs who don't own them
function show_author_posts_only($query) {
global $user_level;
if($query->is_admin && $user_level < 5) {
global $user_ID;
$query->set('author', $user_ID);
unset($user_ID);
}
@carlthewebmaster
carlthewebmaster / .bashrc
Last active December 10, 2015 12:09
shell script to run arch linux on ChromeOS, based on https://gist.github.com/4140706
# Test for an interactive shell. There is no need to set anything
# past this point for scp and rcp, and it's important to refrain from
# outputting anything in those cases.
if [[ $- != *i* ]] ; then
# Shell is non-interactive. Be done now!
return
fi
# Put your fun stuff here.
if uname -a | grep -q SAMSUNG ; then
@carlthewebmaster
carlthewebmaster / gem_install.sh
Created January 25, 2013 18:18
For setting up Gem installation under $HOME
#!/bin/bash
mkdir -p $HOME/lib/ruby/gems #containing folder
# assign new folder to GEM_HOME and write it to your bash_profile to be executed at login.
echo 'export GEM_HOME=$HOME/lib/ruby/gems' >> .bashrc
echo 'PATH=$PATH:$GEM_HOME/bin' >> .bashrc
Mercury Mail tip:
To use Gmail or your ISP's email server with mercury mail, you need to
configure your mercury.ini's MercuryC section as shown below.
Note that the "Host:", "Server_Port" "SMTP_Username" and "SMTP_Password"
need to be correct for YOUR SPECIFIC email provider or ISP. You can usually
find this information in your ISP's support pages under "mail client setup".
Also note that 'path\to\' below indicates the path to YOUR MercuryMail setup.
@carlthewebmaster
carlthewebmaster / annotum-via-wp-cli.sh
Last active December 21, 2015 16:09
Install Annotum on a WordPress site using wp-cli. Optionally import demo content from demo.annotum.org.
#
# annotum via wp-cli
#
# If these steps work, code by @solvitor (http://solvitor.com)
# If not, author is unknown
#
# You'll need to install wp-cli (http://wp-cli.org) and
# set up your (empty, blank) database first. Here, wordpress with user wordpress
#
# Then follow these steps from your web root