First create a Ubuntu 13.04 x64 droplet on DigitalOcean Control Panel
Then ssh with root account, run this in termianl:
$ wget -qO- https://raw.github.com/progrium/dokku/master/bootstrap.sh | sudo bash| monitor: bundle exec ruby monitor.rb |
| require 'net/http' | |
| page_id = "your page id" | |
| access_token = "your access token" | |
| html_source = "your html content" | |
| uri = URI.parse("https://graph.facebook.com/v2.6/#{page_id}/instant_articles") | |
| request = Net::HTTP::Post.new(uri.path) | |
| request.set_form_data({ | |
| access_token: access_token, |
| require 'net/http' | |
| require 'colorize' | |
| # find all available three-letter .io domains | |
| alph = ('a'..'z') | |
| # generate all three-character strings | |
| threes = alph.map { |a| alph.map { |b| alph.map { |c| "#{a}#{b}#{c}" } } }.flatten | |
| def io_available?(tld) | |
| url = URI.parse("http://www.nic.io/cgi-bin/whois?query=#{tld}.io") |
| class Api::RegistrationsController < Api::BaseController | |
| respond_to :json | |
| def create | |
| user = User.new(params[:user]) | |
| if user.save | |
| render :json=> user.as_json(:auth_token=>user.authentication_token, :email=>user.email), :status=>201 | |
| return | |
| else |
| // create an IAM Lambda role with access to dynamodb | |
| // Launch Lambda in the same region as your dynamodb region | |
| // (here: us-east-1) | |
| // dynamodb table with hash key = user and range key = datetime | |
| console.log('Loading event'); | |
| var AWS = require('aws-sdk'); | |
| var dynamodb = new AWS.DynamoDB({apiVersion: '2012-08-10'}); | |
| exports.handler = function(event, context) { |
| # | |
| # Most of the regexes here are from http://twitter.com/schuyler. | |
| # They were posted on Forrst (http://forr.st/~zDa) as a public post, | |
| # so I reworked them into a full class. | |
| # | |
| # Added: | |
| # => (limited) international support -- should handle US/Canada and most of western europe | |
| # => added :receipient, :postcode, and :country fields | |
| # => state/province detection built-in |
| <% pages = sitemap.resources.find_all{|p| p.source_file.match(/\.html/) } %> | |
| <?xml version="1.0" encoding="UTF-8"?> | |
| <urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"> | |
| <% pages.each do |p| %> | |
| <url> | |
| <loc>http://youdomain.com/<%=p.destination_path.gsub('/index.html','')%></loc> | |
| <priority>0.7</priority> | |
| </url> | |
| <% end %> | |
| </urlset> |
This is a place to list the landing pages with the best good conversion ratio.
| module.exports = (grunt) -> | |
| # configuration | |
| grunt.initConfig | |
| # grunt sass | |
| sass: | |
| compile: | |
| options: | |
| style: 'expanded' |