This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def print_dir(home) | |
puts "BASE DIRECTORIES\n#{'=' * 17}\n" | |
puts Dir.entries(home).sort | |
Dir.entries(home).sort.each do |first| | |
next if File.file?(File.join(home, first)) || %w[. ..].include?(first) | |
puts "\nSUB DIRECTORIES [#{first}]\n#{'-' * 55}\n" | |
puts puts Dir.entries(File.join(home, first)).sort.map {|sec| File.join(first, sec)} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var page = require('webpage').create(), | |
system = require('system'), | |
t, address; | |
if (system.args.length === 1) { | |
console.log('Usage: loadspeed.js [some URL]'); | |
phantom.exit(); | |
} | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# CREATE INDEX | |
curl -XPUT 'http://localhost:9200/computers/' | |
# CREATE MAPPING | |
curl -XPUT 'http://localhost:9200/computers/laptop/_mapping' -d '{ | |
"laptop":{ | |
"properties":{ | |
"id":{ | |
"type":"integer" | |
}, |