In this guide we will cover two main cases:
- Ember specific library
- vendor library
The Ember library will assume that Ember has already ben loaded (higher in the loading order) and thus will assume it has access to the Ember API.
| package ; | |
| import haxe.macro.*; | |
| import haxe.macro.Expr.ComplexType; | |
| using haxe.macro.ExprTools; | |
| /** | |
| * ... | |
| * @author Skial Bainn | |
| */ |
| class Metric { | |
| static function main() { | |
| var coinRadius:Millimeters = 12; | |
| var myHeight:Centimeters = 180; | |
| var raceLength:Meters = 200; | |
| var commuteDistance:Kilometers = 23; | |
| diff( coinRadius, myHeight ); // 1.788 meters | |
| diff( raceLength, commuteDistance ); // 22800 meters | |
| sum( commuteDistance, coinRadius ); // 23000.012 meters |
| require 'openssl' | |
| require 'digest/sha2' | |
| module AESCrypt | |
| CIPHER_TYPE = "AES-256-CBC".freeze | |
| class << self | |
| def decrypt(armored_iv_and_ciphertext, key) | |
| ciphertext = [armored_iv_and_ciphertext].pack("H*") | |
| aes = OpenSSL::Cipher::Cipher.new(CIPHER_TYPE) |
| [live] | |
| live ansible_ssh_host=12.34.56.78 ansible_ssh_user=ubuntu |
I recently set up a host running Ubuntu 14.04 LTS, ubuntu-zfs, and PostgreSQL 9.3. Using the ZFS snapshot feature I was able to make a snapshot of the file system holding the PostgreSQL database, write the snapshot to a compressed file, transfer it to another Ubuntu 14.04 LTS host running ubuntu-zfs, restore it, and launch PostgreSQL using that data directory with all the data (seemingly) intact.
The database is very low-traffic, so I do not know how effective this strategy would be for a busier database.
I take no responsibility if you attempt this setup and it causes data loss or other issues. Use it at your own risk; this document is meant to explain a potential setup and open discussion about limitations and potential improvements.
| /* | |
| Copyright (c) 2014 Cauê Waneck | |
| All rights reserved. | |
| Redistribution and use in source and binary forms are permitted | |
| provided that the above copyright notice and this paragraph are | |
| duplicated in all such forms and that any documentation, | |
| advertising materials, and other materials related to such | |
| distribution and use acknowledge that the software was developed | |
| by the <organization>. The name of the |
| docker run -rm -t -i -v $(dirname $SSH_AUTH_SOCK) -e SSH_AUTH_SOCK=$SSH_AUTH_SOCK ubuntu /bin/bash |
I have spent quite a bit of time figuring out automounts of NFS shares in OS X...
Somewhere along the line, Apple decided allowing mounts directly into /Volumes should not be possible:
/etc/auto_master (see last line):
#
# Automounter master map
#
+auto_master # Use directory service