/etc/network/interfaces
auto lo
auto eth0
allow-hotplug wlan0
=Navigating= | |
visit('/projects') | |
visit(post_comments_path(post)) | |
=Clicking links and buttons= | |
click_link('id-of-link') | |
click_link('Link Text') | |
click_button('Save') | |
click('Link Text') # Click either a link or a button | |
click('Button Value') |
#!/usr/bin/ruby | |
require 'nokogiri' | |
require 'open-uri' | |
require 'progressbar' | |
@pages = 50 #7516 | |
@page = "http://www.widespreadsales.com/Products/Search&category=cb&r_num=50&p=" | |
@file = File.open(Dir.pwd + "/data", 'w') |
require 'mongo' | |
@client = Mongo::Connection.new('localhost',27017) | |
@db = @client['school'] | |
@collection = @db['students'] | |
@filter = Array.new | |
@collection.find().each do |student| | |
hash = Hash.new |
# Ruby code for map.rb | |
ARGF.each do |line| | |
# remove any newline | |
line = line.chomp | |
# do nothing will lines shorter than 2 characters | |
next if ! line || line.length < 2 |
FYI, signing up for multiple accounts using the same info is against their terms of service. If you do this you may have your account removed by DigitalOcean and lose access to any coins you've mined.
Create an Ubuntu 13.04 x64 droplet with the size you want. See below for speed ranges by instance size.
You will be emailed an ip address and password. SSH into your new VM.
cbeast posted his settings that will let you build primecoind on any size instance.
namespace :prod do | |
desc "Copy local database to production" | |
task :sync => :environment do | |
system 'mongodump -h localhost:27017 -d <LOCAL_DB_NAME> -o /path/to/folder' | |
system 'mongorestore -h host:port -db <PROD_DB_NAME> -u <DB_USER> -p <DB_PASS> --drop /path/to/folder/local_db_name' | |
end | |
end |
#Guía rápida para el minado de Litecoin en Ubuntu
##Paso 1
###Instalación OpenSSH en maquinas mineras
La conexión a las maquinas mineras se hará via ssh
sudo apt-get install openssh-server
def self.to_geojson | |
{ type: "FeatureCollection", | |
features: | |
self.all.map do |local| | |
{ | |
type: "Feature", | |
geometry: { type: "Point", coordinates: local.coordinates}, | |
id: local.id, | |
properties: { prop1: local.val1, | |
prop2: local.val2, |