Skip to content

Instantly share code, notes, and snippets.

@tnez
tnez / decode_session_cookie.rb
Last active October 25, 2018 12:16
The following can be pasted and evaluated in a rails (~> 3.2) console in order to give a simple utility function to inspect the session cookie that can be taken and pasted directly from browser dev-tools.
import React from 'react'
import { connect } from 'react-readux'
import { PropTypes } from 'prop-types'
import SuperCoolSpinner from './SuperCoolSpinner'
const DataFetcher = ({ children, dispatch, fetchAction, shouldFetch }) => {
// fetch data if needed
if (shouldFetch) { dispatch(fetchAction) }
// render the spinner if we should fetch (this should be true until data has

Salesforce Transition

Existing Functionality

Customer Communication

Trigger on job status changes and send email, SMS as specified by user.

;; -*- mode: emacs-lisp -*-
;; This file is loaded by Spacemacs at startup.
;; It must be stored in your home directory.
(defun dotspacemacs/layers ()
"Configuration Layers declaration.
You should not put any user code in this function besides modifying the variable
values."
(setq-default
;; Base distribution to use. This is a layer contained in the directory
;; -*- mode: emacs-lisp -*-
;; This file is loaded by Spacemacs at startup.
;; It must be stored in your home directory.
(defun dotspacemacs/layers ()
"Configuration Layers declaration.
You should not put any user code in this function besides modifying the variable
values."
(setq-default
;; Base distribution to use. This is a layer contained in the directory
# given a *D* dimensional array *I* where *N* regions, denoted by
# sequential integers starting at 1, return an NxD array *coords*
# containing the centers of mass for each region (in index space) and
# an NxN array *Dist* where the entry D[i,j] corresponds to the euclidean
# distance between the centers of regions i and j respectively.
import numpy as np
from scipy.ndimage.measurements import center_of_mass
D = I.ndim
N = I[:].max()