Skip to content

Instantly share code, notes, and snippets.

Avatar

Jack James surrealroad

View GitHub Profile
@surrealroad
surrealroad / FDX_Queries
Created Jun 23, 2014
XPath Queries for Final Draft 8+ XML files (.fdx)
View FDX_Queries
// 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 Dec 30, 2015
How to create a LAMP using Parallels Desktop 9
View Parallels 9 Lamp
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 Mar 6, 2016
jQuery snippet to grab latest discourse forum posts and display them inside a container uses TBS classes
View Fetch Discourse Topics
// 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 Apr 6, 2016
Digital Ocean Discourse production install with LAMP (using Apache)
View gist:5146661
#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
#