- Go to Digital Ocean
- Create new droplet
- London
- Ubuntu
- No apps
- Add SSH keys
# Deploying NodeJS App on Google Cloud Platform | |
`authored Jul 3 2015 by kengz` | |
## Installation | |
- Account with Google Cloud Platform. | |
- Install [Google Cloud Platform SDK](https://cloud.google.com/sdk/) to use `cloud` in the terminal. | |
- Install [Docker](https://cloud.google.com/tutorials/install-docker) for the VM container. | |
- Locally, login for the first time: `gcloud auth login` |
// SOURCE: http://davidwalsh.name/convert-image-data-uri-javascript | |
function getDataUri(url, callback) { | |
var image = new Image(); | |
image.onload = function () { | |
var canvas = document.createElement('canvas'); | |
canvas.width = this.naturalWidth; // or 'width' if you want a special/scaled size | |
canvas.height = this.naturalHeight; // or 'height' if you want a special/scaled size |
# 参考 | |
# * https://developers.google.com/google-apps/calendar/quickstart/ruby | |
# * https://github.com/google/google-api-ruby-client/blob/master/samples/cli/lib/samples/analytics.rb | |
# * https://gist.github.com/rakuishi/5010ee819260cdd32a15 | |
# $ gem install google-api-client | |
require 'googleauth' | |
require 'googleauth/stores/file_token_store' | |
require 'google/apis/analytics_v3' | |
require 'fileutils' |
Warning: These views are highly oppinated and might have some slightly incorrect facts. My experience with typescript was about 2 weeks in Node and a week in angular2.
TypeScript is implementing their own take on JavaScript. Some of the things they are writing will likely never make it in an official ES* spec either.
Technologies that have competing spec / community driven development have a history of failing; take: Flash, SilverLight, CoffeeScript, the list goes on. If you have a large code base, picking TypeScript is something your going to be living with for a long time. I can take a bet in 3 years JavaScript will still be around without a doubt.
Its also worth noting that they have built some things like module system and as soon as the spec came out they ditched it and started using that. Have fun updating!
By the end of this quick guide, you will know how to compile a Phoenix app release using Exrm and run it inside a Docker container. I've found only a couple of articles that discuss getting an Elixir app up and running inside a Docker container, and even those only touched on some parts of the process. The idea is that this guide will give you a full end-to-end example of how to get all the pieces and parts working together so that you are able to deploy your Phoenix application inside a Docker container.
- You already have a working Elixir environment with the Phoenix Framework installed
- You have at least basic working knowledge of Docker, and have installed the Docker tools onto your local environment
#TinyMCE style toggle button
First of all, you need to define a custom format:
formats: {
custom_format: {inline: 'span', attributes: {class: 'some_css_class'}}
}
Then you'll have to add a button to your toolbar:
(function() { | |
'use strict'; | |
/** | |
* Core method, similar to jQuery (only simpler) | |
* | |
* @param {String|HTMLElement} s The CSS selector to search for or HTML element to wrap with functionality | |
* @param {HTMLElement} root OPTIONAL An HTML element to start the element query from | |
* @return {Array} The collection of elements, wrapped with functionality (see API methods) | |
*/ |
defmodule AppName.IpnController do | |
@moduledoc """ | |
IPN Controller. | |
""" | |
use AppName.Web, :controller | |
def create(conn, params) do | |
# PayPal requires the params returned in the exact order given. | |
# The map needs to be a list. encode/1 keep the order of a list, |
Disclaimer: This piece is written anonymously. The names of a few particular companies are mentioned, but as common examples only.
This is a short write-up on things that I wish I'd known and considered before joining a private company (aka startup, aka unicorn in some cases). I'm not trying to make the case that you should never join a private company, but the power imbalance between founder and employee is extreme, and that potential candidates would