Using the ec2 tools:
ec2-run-instances ami-xxxxxxxx -t t2.micro -k mykeypair -g sg-xxxxxxx
Using aws:
aws ec2 run-instances --image-id ami-xxxxxx --count 1 --instance-type t2.micro --key-name mykeypair --security-groups mysecuritygroup
// Just out of curiosity let's see how many 64-bit IDs can we pack in a mongoDB | |
// document. | |
package main | |
import ( | |
"fmt" | |
"math/rand" | |
"time" | |
"gopkg.in/mgo.v2" |
var casper = require('casper').create(); | |
var system = require('system'); | |
var util = require('../lib/util'); | |
casper.options.viewportSize = { width: 1024, height: 768*3 }; | |
casper.options.pageSettings = { loadImages:true, loadPlugins:true, webSecurityEnabled: false }; | |
var ID = casper.cli.args[0]; | |
if (typeof ID == 'undefined') { |
// ======================================== | |
// ! Casper | |
// ! Common issues: Unsafe Javascript attempt to access frame with URL | |
// ! Issues: http://goo.gl/u1murB | |
// ! Version : 1.0 | |
// ======================================== | |
var fs = require('fs'); | |
var utils = require('./src/utils'); | |
var system = require('system'); | |
var casper = require('casper').create(); |
{ | |
"africa": { | |
"name": "Africa", | |
"names": [ | |
"Афрыка", | |
"Àfrica", | |
"Afrika", | |
"Afrika", | |
"Afrika", | |
"Αφρική", |
AFG: Afghanistan | |
AGO: Angola | |
ALB: Albania | |
ARE: United Arab Emirates | |
ARG: Argentina | |
ARM: Armenia | |
ATA: Antarctica | |
ATF: French Southern and Antarctic Lands | |
AUS: Australia | |
AUT: Austria |
#include <bits/stdc++.h> | |
using namespace std; | |
typedef long long int64; | |
inline int64 f(int64 x) { | |
return x * x + (x + 1) * (x + 1); | |
} | |
inline int64 g(int64 x) { | |
return x * (x + 1) / 2; |
bool check(int64 d, int64 c) { | |
return f(d) >= c; | |
} |
const int MAX = 1000; | |
//endregion | |
long long X, Y, N; | |
long long ta(long long length) | |
{ | |
return length * (length + 1) / 2; | |
} | |
// Upper right |
function max() { | |
if [ $1 -gt $2 ] | |
then | |
echo $1 | |
else | |
echo $2 | |
fi | |
} | |
function min() { |