- Register a domain name. Buy a cert for it.
- Spin up Ubuntu Trusty 14.04 on AWS & point DNS at the instance. Don't bother making user accounts or anything; only somebody with your key should be able to ssh in. Add security group rules allowing https from anywhere, or maybe http if you want to redirect.
- Make an EBS volume or raid up some instance stores and mount them on
/mnt/mastodon
, owned by ubuntu. - Download all the files in this gist to your local controlling host, e.g., your laptop.
- Make a file named
inventory
with[general]\nyour-host.tld
in it. - Put all of the
*.conf
files in this gist into a subdirectory namedfiles
. - Put your certs somewhere in the directory & make sure the ansible playbook
services.yml
is pointing to them. - Run
ansible-playbook -i inventory host-setup.yml
- Run
ansible-playbook -i inventory mastodon.yml
- you might get ruby 2.3.3 instead of 2.3.1 in which case you should just edit the Gemfile.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0"?> | |
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> | |
<xsl:output method="xml" cdata-section-elements="content"/> | |
<xsl:template match="/"> | |
<xsl:apply-templates /> | |
</xsl:template> | |
<xsl:template match="note"> | |
<xsl:copy> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0"?> | |
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> | |
<xsl:output method="xml" cdata-section-elements="content"/> | |
<xsl:template match="/"> | |
<xsl:apply-templates /> | |
</xsl:template> | |
<xsl:template match="note"> | |
<xsl:copy> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
url = 'http://localhost:8080/okapi-longhorn/' | |
response = requests.post(url+'projects/new') | |
# create a new project | |
response = requests.get(url+'projects/') | |
# push a file | |
payload = "hello world!" | |
headers = {'accept-encoding': 'multipart/form-data', 'content-type': 'text/html'} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | |
<modelVersion>4.0.0</modelVersion> | |
<groupId>com.spartansoftwareinc.samples</groupId> | |
<artifactId>sample-wssdk-client-component</artifactId> | |
<version>1.0-SNAPSHOT</version> | |
<packaging>jar</packaging> | |
<name>Sample WorldServer Web Services Component</name> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0"?> | |
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0" | |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> | |
<modelVersion>4.0.0</modelVersion> | |
<groupId>com.spartansoftwareinc.samples</groupId> | |
<artifactId>sample-wssdk-component</artifactId> | |
<name>Sample WorldServer component</name> | |
<url>http://maven.apache.org</url> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" ?> | |
<!DOCTYPE tmx SYSTEM "tmx14.dtd"> | |
<tmx version="1.4"> | |
<header | |
creationtool="Sdl.SDLX .Net API" | |
creationtoolversion="9.3.3002.0" | |
datatype="unknown" | |
segtype="sentence" | |
adminlang="en" | |
srclang="en" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.io.File | |
import scala.collection.mutable | |
// A tool to digest and visualize jstack traces, written poorly in scala. | |
// Usage | |
// scala jstack.scala -t [regex] [files] | |
// where | |
// [regex] is a regular expression applied to thread names in the jstack | |
// dumps. Matching threads will be processed. The -t option |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# build_fat.sh | |
# | |
# Created by Robert Carlsen on 15.07.2009. Updated 24.9.2010 | |
# build an arm / i386 lib of standard linux project | |
# | |
# initially configured for tesseract-ocr v2.0.4 | |
# updated for tesseract prerelease v3 | |
outdir=outdir |