I hereby claim:
- I am sergicastro on github.
- I am sergicastro (https://keybase.io/sergicastro) on keybase.
- I have a public key whose fingerprint is 48D9 714B 96FF 2015 61B9 5885 5D8F 28D9 989D BCA8
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
private static int toDecimal(final String roman) | |
{ | |
String[] chars = roman.split("(?!^)"); | |
int d = 0; | |
ROMAN last = null; | |
// the trick is run the sequence from right to left | |
for (int i = chars.length - 1; i >= 0; i--) | |
{ | |
String c = chars[i]; |
[Image [id=1601, name=CentOS 5.8 x64, distribution=CentOS, publicImage=true, slug=null], Image [id=1602, name=CentOS 5.8 x32, distribution=CentOS, publicImage=true, slug=null], Image [id=12573, name=Debian 6.0 x64, distribution=Debian, publicImage=true, slug=null], Image [id=12575, name=Debian 6.0 x32, distribution=Debian, publicImage=true, slug=null], Image [id=14097, name=Ubuntu 10.04 x64, distribution=Ubuntu, publicImage=true, slug=null], Image [id=14098, name=Ubuntu 10.04 x32, distribution=Ubuntu, publicImage=true, slug=null], Image [id=32387, name=Fedora 17 x32, distribution=Fedora, publicImage=true, slug=null], Image [id=32399, name=Fedora 17 x32 Desktop, distribution=Fedora, publicImage=true, slug=null], Image [id=32419, name=Fedora 17 x64 Desktop, distribution=Fedora, publicImage=true, slug=null], Image [id=32428, name=Fedora 17 x64, distribution=Fedora, publicImage=true, slug=null], Image [id=303619, name=Debian 7.0 x32, distribution=Debian, publicImage=true, slug=null], Image [id=308287, name=Debian |
public static void main(String[] args) throws Exception { | |
String publicKey = Files.toString(new File(System.getProperty("user.home") + "/.ssh/id_rsa.pub"), Charsets.UTF_8); | |
String privateKey = Files.toString(new File(System.getProperty("user.home") + "/.ssh/id_rsa"), Charsets.UTF_8); | |
ComputeServiceContext context = ContextBuilder.newBuilder("digitalocean") // | |
.credentials("client_ID", "api_key") // | |
.modules(ImmutableSet.of(new SshjSshClientModule(), new SLF4JLoggingModule())) // | |
.buildView(ComputeServiceContext.class); | |
try { |
# Rasptrans Makefile | |
# Copyright (c) 2013 Ignasi Barrera | |
# This file is released under the MIT License, see LICENSE file. | |
TARGETS = rasptrans | |
TREMOTE = $(shell which transmission-remote) | |
CC = gcc | |
LN = $(CC) | |
PREFIX ?= /usr/local |