#elasticsearch Crash Course!
- A way to search... things
- A way to search your data in terms of natural language, and so much more
- A distributed version of lucene with a JSON API.
- A fancy clustered database
function Uninstall-AppFabricCacheNode { | |
#TODO: Should try and remove the configuration stuff | |
gwmi win32_product -filter "Name LIKE 'AppFabric%'" |% { | |
$key="IdentifyingNumber=`"$($_.IdentifyingNumber)`",Name=`"$($_.Name)`",version=`"$($_.Version)`""; | |
([wmi]"Win32_Product.$key").uninstall() | |
} | |
} | |
function Reset-AppFabricCacheDatabase { | |
param( |
authRouteProvider.$inject = ['$routeProvider']; | |
function authRouteProvider ($routeProvider) { | |
/** | |
* Creates a controller bound to the route, or wraps the controller in param | |
* so the authentication check is run before the original controller is executed | |
* @param currentController | |
* @return {Function} The wrapper controller | |
*/ | |
function redirectCtrlFactory (currentController) { | |
_ctrl.$inject = ['currentUser__', 'userRole__', '$location']; |
Copyright (c) 2015 - Xavier Cambar <@ xcambar_gmail.com> | |
Permission is hereby granted, free of charge, to any person obtaining a copy | |
of this software and associated documentation files (the "Software"), to deal | |
in the Software without restriction, including without limitation the rights | |
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
copies of the Software, and to permit persons to whom the Software is | |
furnished to do so, subject to the following conditions: | |
The above copyright notice and this permission notice shall be included in |
class AccountFeeder() extends com.excilys.ebi.gatling.core.feeder.Feeder { | |
import org.joda.time.DateTime | |
import scala.util.Random | |
private val RNG = new Random() | |
// random number in between [a...b] | |
def randInt(a:Int, b:Int) = RNG.nextInt(b-a) + a | |
def daysOfMonth(year:Int, month:Int) = new DateTime(year, month, 1, 0, 0, 0, 000).dayOfMonth().getMaximumValue() |
Latency Comparison Numbers (~2012) | |
---------------------------------- | |
L1 cache reference 0.5 ns | |
Branch mispredict 5 ns | |
L2 cache reference 7 ns 14x L1 cache | |
Mutex lock/unlock 25 ns | |
Main memory reference 100 ns 20x L2 cache, 200x L1 cache | |
Compress 1K bytes with Zippy 3,000 ns 3 us | |
Send 1K bytes over 1 Gbps network 10,000 ns 10 us | |
Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD |
.cache | |
target/ | |
*~ | |
#* | |
*# | |
*/src/main/*/META-INF/ | |
*/src/main/*/WEB-INF/lib/ | |
.access_token | |
.result | |
.classpath |
rm(list = ls(all = TRUE)) | |
#http://etfprophet.com/days-since-200-day-highs/ | |
require(quantmod) | |
getSymbols('^GSPC',from='1900-01-01') | |
daysSinceHigh <- function(x, n){ | |
apply(embed(x, n), 1, which.max)-1 | |
} |
Save books out of Safari Books Online
From http://objectivesea.tumblr.com/post/9033067018/safaribooks
This is hard. I spent way too much time figuring this out, because I was annoyed that a book I bought (Addison-Wesley) was available online for free, except only for 45 days after which payment was required. So I made this hack... probably useful to no one else, but here it is.
Requirements: