Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View surrealroad's full-sized avatar

Jack James surrealroad

View GitHub Profile
@surrealroad
surrealroad / FDX_Queries
Created June 23, 2014 15:23
XPath Queries for Final Draft 8+ XML files (.fdx)
// get paragraphs
"/FinalDraft/Content/Paragraph"
// paragraph text
"/FinalDraft/Content/Paragraph[" & $paragraphIndex & "]/Text"
// scene summary
"/FinalDraft/Content/Paragraph[" & $paragraphIndex & "]/SceneProperties/Summary/Paragraph/Text"
// paragraph type
@surrealroad
surrealroad / Parallels 9 Lamp
Last active December 30, 2015 11:29
How to create a LAMP using Parallels Desktop 9
1. File > New…
2. Download Ubuntu Free
3. Set parallels user password
4. Install Parallels Tools / Restart
5. `sudo apt-get update`
6. `sudo apt-get install apache2`
7. `sudo apt-get install mysql-server`
8. `sudo apt-get install php5 libapache2-mod-php5`
9. Test browsing to http://localhost or http://parallels-ip-address
10. `sudo apt-get install openssh-server`
@surrealroad
surrealroad / Fetch Discourse Topics
Last active March 6, 2016 17:12
jQuery snippet to grab latest discourse forum posts and display them inside a container uses TBS classes
// usage
var forumURL = 'http://forums.com';
$('#discourse-latest-container').getDiscourseTopics(forumURL, 'latest');
// fetch discourse items
(function($) {
jQuery.fn.getDiscourseTopics = function (url, page) {
// load forum topics
if($(this).exists()) {
$this = $(this);
@surrealroad
surrealroad / gist:5146661
Last active April 6, 2016 03:26
Digital Ocean Discourse production install with LAMP (using Apache)
#create & deploy lamp droplet
#login via ssh as root
#initial setup (ref: http://library.linode.com/getting-started#sph_logging-in-for-the-first-time)
# update /etc/hosts (to "thalassophobia.surrealroad.com")
nano /etc/hosts
#