Server Price Breakdown: DigitalOcean, Amazon AWS LightSail, Vultr, Linode, OVH, Hetzner, Scaleway/Online.net:
Sorted (Descending): Network, Cores, RAM, Storage, Transfer
Provider | Type | RAM | Cores | Storage | Transfer | Network | Price |
---|
# Back up your iTunes library to S3 | |
git clone git://github.com/sstephenson/mackerel.git | |
ruby -rubygems mackerel/examples/itunes_backup.rb amazon-s3://YOUR_ACCESS_KEY_ID:[email protected]/YOUR_BUCKET_NAME/itunes.mackerel |
# Lo-fi client for the Facebook API. E.g.: | |
# | |
# fb = FacebookClient.new(:api_key => 'api-key', :secret => 'secret') | |
# fb.call 'users.getInfo', :session_key => 'session-key', :uids => 'user-id', :fields => 'birthday' | |
# | |
class FacebookClient | |
def initialize(default_params={}) | |
@default_params = default_params.reverse_merge({ | |
:rest_server => 'http://api.new.facebook.com/restserver.php', | |
:format => 'JSON', |
class Image < ActiveRecord::Base | |
before_create, :set_width_and_height | |
has_attached_file :img, | |
:url => "/system/images/:attachment/:id/:basename.:extension", | |
:path => "#{Rails.root}/public/system/images/:attachment/:id/:basename.:extension" | |
def set_width_and_height | |
# this next line is the magic line | |
geo = Paperclip::Geometry.from_file(img.to_file(:original)) |
/** | |
* Using Operator Mono in Atom | |
* | |
* 1. Open up Atom Preferences. | |
* 2. Click the “Open Config Folder” button. | |
* 3. In the new window’s tree view on the left you should see a file called “styles.less”. Open that up. | |
* 4. Copy and paste the CSS below into that file. As long as you have Operator Mono SSm installed you should be golden! | |
* 5. Tweak away. | |
* | |
* Theme from the screenshot (http://cdn.typography.com/assets/images/blog/operator_ide2.png): |
#!/usr/bin/env python | |
""" | |
This script is designed to generate a simple HTML file with _all_ of your | |
Pinboard.in bookmarks. | |
You should edit the `username`, `password`, `bookmark_filename`, and `tag` | |
variables. | |
Requirements: |
--============================== | |
-- Send Keynote Text to Desktop Markdown File | |
-- Writted By: Richard Dooling https://github.com/RichardDooling/ | |
-- Based on | |
-- Send Keynote Presenter Notes to Evernote | |
-- Version 1.0.1 | |
-- Written By: Ben Waldie <[email protected]> | |
-- http://www.automatedworkflows.com | |
-- Version 1.0.0 - Initial release |
This guide was written because I don't particularly enjoy deploying Phoenix (or Elixir for that matter) applications. It's not easy. Primarily, I don't have a lot of money to spend on a nice, fancy VPS so compiling my Phoenix apps on my VPS often isn't an option. For that, we have Distillery releases. However, that requires me to either have a separate server for staging to use as a build server, or to keep a particular version of Erlang installed on my VPS, neither of which sound like great options to me and they all have the possibilities of version mismatches with ERTS. In addition to all this, theres a whole lot of configuration which needs to be done to setup a Phoenix app for deployment, and it's hard to remember.
For that reason, I wanted to use Docker so that all of my deployments would be automated and reproducable. In addition, Docker would allow me to have reproducable builds for my releases. I could build my releases on any machine that I wanted in a contai
defmodule MdToolbox.Api.SoapMethod do | |
alias __MODULE__ | |
alias MdToolbox.Api.Request | |
@doc "Builds the request from params" | |
@callback build_request(params :: list()) :: map() | |
@doc "Parses the request's response into data" | |
@callback parse_response(request :: Request.t()) :: Request.t() |
# This is the target module which will be overwritten after dynamic compilation | |
# You'll be using this to read configuration in your code. For instance, if you | |
# have a configuration key called `:redis_timeout`, you could read it using | |
# `MM.Config.get(:redis_timeout)` | |
defmodule MM.Config do | |
# we use a default implementation which raises an error when our code tries | |
# to read configuration before it is compiled. | |
def get(_key), do: raise("Config has not been compiled yet!") | |
end |