Skip to content

Instantly share code, notes, and snippets.

View richstoner's full-sized avatar
💭
🚀

Rich Stoner richstoner

💭
🚀
View GitHub Profile
Installing Barracuda and Octopus
$ cd;wget -q -U iCab http://files.aegir.cc/BOA.sh.txt;bash BOA.sh.txt
$ boa in-head public server.mydomain.org my@email o1
Now simply watch the progress and choose some platforms to include. Done!
And how to upgrade Barracuda and all Octopus instances?
$ barracuda up-head
@dlferro
dlferro / gist:3004639
Created June 27, 2012 15:00
Leaflet Image Deepzoom
<html>
<head>
<link rel="stylesheet" href="lib/leaflet.css" />
<!--[if lte IE 8]>
<link rel="stylesheet" href="lib/leaflet.ie.css" />
<![endif]-->
</head>
<body>
<div id="map" style="width:1004px; height:748px; border: 1px solid black;"></div>
<script type="text/javascript" src="lib/leaflet-src.js"></script>
@piscisaureus
piscisaureus / pr.md
Created August 13, 2012 16:12
Checkout github pull requests locally

Locate the section for your github remote in the .git/config file. It looks like this:

[remote "origin"]
	fetch = +refs/heads/*:refs/remotes/origin/*
	url = git@github.com:joyent/node.git

Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:

@odebeir
odebeir / gist:5038467
Last active April 1, 2016 23:10
Color deconvolution for python cf : A. C. Ruifrok and D. A. Johnston, “Quantification of histochemical staining by color deconvolution.,” Analytical and quantitative cytology and histology / the International Academy of Cytology [and] American Society of Cytology, vol. 23, no. 4, pp. 291–9, Aug. 2001.
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
@JosefJezek
JosefJezek / install-and-setup-elasticsearch.md
Last active December 16, 2015 14:48
Install & Setup ElasticSearch
@gourneau
gourneau / zpl-tcp.py
Created September 11, 2014 17:23
Python ZPL over TCP/IP Example
#!/usr/bin/env python
#ZPL docs can be found at https://support.zebra.com/cpws/docs/zpl/zpl_manual.pdf
#This works with Python 3, change the bytes to str if you are using Python 2
import socket
#One easy way to find the IP address is with this nmap command
# nmap 192.168.0.* -p T:9100 --open
@sphaero
sphaero / gstreamer-build.sh
Last active February 11, 2023 16:25
Install & build gstreamer from git
#!/bin/bash --debugger
set -e
BRANCH="master"
if grep -q BCM2708 /proc/cpuinfo; then
echo "RPI BUILD!"
RPI="1"
fi
[ -n "$1" ] && BRANCH=$1
@kwakwaversal
kwakwaversal / install-guest-additions.sh
Last active July 23, 2018 21:04 — forked from fernandoaleman/gist:5083680
How to update VirtualBox Guest Additions for debian/jessie64 with vagrant #shell
# Start a vagrant without virtualbox guest additions
$ vagrant init debian/jessie64
$ vagrant up
# You should see a message like:
# [default] The guest additions on this VM do not match the install version of
# VirtualBox! This may cause things such as forwarded ports, shared
# folders, and more to not work properly. If any of those things fail on
# this machine, please update the guest additions and repackage the
# box.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@eriadam
eriadam / logstash.conf
Last active March 16, 2020 21:19
Logstash serve configuration for the JustLog iOS logger.
input {
tcp {
port => 5000
# You need to have the json_lines plugin installed
codec => json_lines
# It is necessary to configure the SSL properly. Otherwise
# the logs wont make it to ES.
ssl_enable => true