This file contains hidden or 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
[Install] | |
WantedBy=multi-user.target | |
[Unit] | |
Description=Google Cloud Compute Engine SQL Proxy | |
Requires=networking.service | |
After=networking.service | |
[Service] | |
Type=simple |
This file contains hidden or 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 the VM | |
iohyve create debianvm 8G nmdm8 | |
# Set the correct bootloader | |
iohyve set debianvm loader=grub-bhyve | |
# Fetch the image | |
iohyve fetch http://cdimage.debian.org/debian-cd/8.1.0/amd64/iso-cd/debian-8.1.0-amd64-netinst.iso | |
# Install |
This file contains hidden or 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
# using such a setup requires `apt-get install lua-nginx-redis` under Ubuntu Trusty | |
# more info @ http://wiki.nginx.org/HttpLuaModule#access_by_lua | |
http { | |
lua_package_path "/etc/nginx/include.d/?.lua;;"; | |
lua_socket_pool_size 100; | |
lua_socket_connect_timeout 10ms; | |
lua_socket_read_timeout 10ms; | |
server { |
This file contains hidden or 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 convert_to_optical_densities(rgb,r0,g0,b0): | |
OD = rgb.astype(float) | |
OD[:,:,0] /= r0 | |
OD[:,:,1] /= g0 | |
OD[:,:,2] /= b0 | |
return -np.log(OD) | |
def color_deconvolution(rgb,r0,g0,b0,verbose=False): | |
stain_OD = np.asarray([[0.18,0.20,0.08],[0.01,0.13,0.0166],[0.10,0.21,0.29]]) #hematoxylin, eosyn, DAB |
This file contains hidden or 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
#Just a small script I wrote to backup mysql via ZFS snapshots | |
#!/bin/sh | |
# Copyright (c) 2011 Vladislav V. Prodan <universite at ukr.net> | |
# My MySQL server uses the directory: | |
# tank/mysql # main directory MySQL | |
# tank/mysql/ibdata # data of InnoDB tables | |
# tank/mysql/iblogs # InnoDB transaction logs |