Worked 2015-09-08 for Phoenix 1.0.1 on Dokku 0.3.25.
These instructions assume you've set up Dokku. If not, go find a tutorial for that part. My notes for setting it up on Digital Ocean.
Create a Dokku app:
// Copyright 2017, the Flutter project authors. Please see the AUTHORS file | |
// for details. All rights reserved. Use of this source code is governed by a | |
// BSD-style license that can be found in the LICENSE file. | |
import 'dart:async'; | |
import 'dart:collection'; | |
import 'package:cloud_firestore/cloud_firestore.dart'; | |
import 'package:flutter/foundation.dart'; | |
import 'package:flutter/material.dart'; |
############################################################################### | |
# Variables # | |
############################################################################### | |
variables: | |
DOKKU_HOST: 'host.com' | |
PROJECT_NAME: 'project_name' | |
############################################################################### | |
# Cache # | |
############################################################################### |
Worked 2015-09-08 for Phoenix 1.0.1 on Dokku 0.3.25.
These instructions assume you've set up Dokku. If not, go find a tutorial for that part. My notes for setting it up on Digital Ocean.
Create a Dokku app:
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
<?php function sanitize_page($buffer) { | |
$search = array('/\>[^\S ]+/s', '/[^\S ]+\</s', '/(\s)+/s'); | |
$replace = array('>', '<', '\\1'); | |
$buffer = preg_replace($search, $replace, $buffer); | |
function gzip_doc($buffer) { if (substr_count($_SERVER['HTTP_ACCEPT_ENCODING'], 'gzip')) { return ob_gzhandler($buffer, 5); } else { return $buffer; }} | |
return gzip_doc($buffer); | |
} ?> |
/* | |
* twitter-entities.js | |
* This function converts a tweet with "entity" metadata | |
* from plain text to linkified HTML. | |
* | |
* See the documentation here: http://dev.twitter.com/pages/tweet_entities | |
* Basically, add ?include_entities=true to your timeline call | |
* | |
* Copyright 2010, Wade Simmons | |
* Licensed under the MIT license |