Skip to content

Instantly share code, notes, and snippets.

@benweet
benweet / Welcome file abcd.md
Last active September 25, 2017 08:59
Welcome file

Welcome to StackEdit!

Hey! I'm your first Markdown document in StackEdit[^stackedit]. Don't delete me, I'm here to help! I can be recovered anyway in the Utils tab of the Settings dialog.

Documents

StackEdit stores your documents in your browser, which means all your documents are automatically saved locally and are accessible offline!

Note:

@benweet
benweet / client.js
Last active June 28, 2016 22:09
socket.io / engine.io load balancing with stickyness using nginx hash
// Same random hash will be used during the whole session
var hash = Math.random().toString(36).slice(2, 10)
// Get absolute uri
var uri = document.createElement('a')
uri.href = '/engine.io/?hash=' + hash
var socket = eio(uri.href)
@benweet
benweet / get_rev.sh
Last active November 20, 2015 23:45
Get file revision
curl https://app.classeur.io/api/v1/files/ApP3fU20RBsiuJluYrbY/fromRev/40157/toRev/40157 \
-u $USER_ID:$API_TOKEN
@benweet
benweet / UserCustom extension
Created October 26, 2014 18:08
[StackEdit] Fix for CouchDB import
// To be copy/pasted in Settings>Extensions>UserCustom
utils.decodeBase64 = function(str) {
return decodeURIComponent(window.escape(window.atob(str)));
};
#!/bin/bash
#
# This script installs and configures couchdb on a fresh Amazon Linux AMI instance.
#
# Must be run with root privileges
# Tested with Amazon Linux AMI release 2011.02.1.1 (ami-8c1fece5)
#
export BUILD_DIR="$PWD"
@benweet
benweet / test8.md
Created August 22, 2013 20:39
README.md

StackEdit

StackEdit is a free, open-source Markdown editor based on PageDown, the Markdown library used by Stack Overflow and the other Stack Exchange sites.

StackEdit can:

  • Manage multiple Markdown documents online or offline
  • Export your documents in Markdown or HTML and format it using a template
  • Synchronize your Markdown documents in the Cloud
@benweet
benweet / test6.md
Created August 22, 2013 20:16
Welcome document

Welcome to StackEdit! {#welcome}

Hello, I am your first Markdown document within StackEdit[^stackedit]. Don't delete me, I can be helpful. I can be recovered anyway in the Utils tab of the Settings dialog.a


@benweet
benweet / test5.md
Created August 22, 2013 20:12
Welcome document

Welcome to StackEdit! {#welcome}

Hello, I am your first Markdown document within StackEdit[^stackedit]. Don't delete me, I can be helpful. I can be recovered anyway in the Utils tab of the Settings dialog.a


@benweet
benweet / test1.html
Created August 22, 2013 19:39
Welcome document
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Welcome document</title>
<link rel="stylesheet" href="http://benweet.github.io/stackedit/css/main-min.css" />
<script type="text/javascript" src="http://benweet.github.io/stackedit/lib/MathJax/MathJax.js?config=TeX-AMS_HTML"></script>
</head>
<body><h1 id="welcome" class="wmd-title">Welcome to StackEdit! </h1>
@benweet
benweet / test.md
Created July 7, 2013 17:09
Title