Skip to content

Instantly share code, notes, and snippets.

View tgrrr's full-sized avatar

Phil Steinke tgrrr

View GitHub Profile
@tgrrr
tgrrr / TEMPmodel.txt
Created October 14, 2020 06:51
diff of 2 models
# Outlining the model
model{
for (i in 1:Ntotal) {
- zy[i] ~ dgamma((mu[i]^2)/ zVar, mu[i]/ zVar) # Use sample variance as an estimate of the population variance
- mu[i] <- zbeta0 + sum(zbeta[1:Nx] * zx[i,1:Nx])
+ zy[i] ~ dgamma((mu[i]^2)/ zVar, zVar/mu[i]) # Use sample variance as an estimate of the population variance
+mu[i] <- sum(zbeta[1:Nx] * zx[i,1:Nx])
}
- zbeta0 ~ dnorm(0, 1/2^2)
@tgrrr
tgrrr / launch.json
Last active June 15, 2020 10:08
vscode debugger configuration .vscode/launch.json react node with attach mode
{
// before running this script, open chrome in terminal using:
// /Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --remote-debugging-port=9222
// GIST: https://gist.github.com/tgrrr/dc95952a33cfc04ab4b8ace23e63e848
"version": "0.2.0",
"configurations": [
{
"name": "Launch Chrome against localhost",
@tgrrr
tgrrr / .eslintrc.json
Created May 1, 2020 08:43
react eslint
{
"env": {
"browser": true,
"es6": true,
"node": true
},
"extends": [
"plugin:react/recommended",
"airbnb"
],
"scripts": {
"cypress:run": "./node_modules/.bin/cypress run",
"cypress:open": "./node_modules/.bin/cypress open",
"deploy:test": "yarn build && netlify deploy --prod",
"deploy": "netlify deploy",
"docker:build": "docker build . -t tgrrr/cra-docker",
"docker:publish": "docker image push $npm_package_config_imageRepo:$npm_package_version",
"docker:pull": "docker pull tgrrr/cra-docker:latest",
"predocker:run": "echo \"\\x1b[104m\\x1b[97m\n[ you can now open this in your browser at localhost:8080 ]\n\\x1b[0m\"",
"docker:run": "docker run -p 8080:80 tgrrr/cra-docker",
@tgrrr
tgrrr / change git origin
Created March 19, 2019 03:15
Github commands to follow after changing the ownership of a repo
git checkout master
git remote -v # check what remotes are set
git remote rm origin
git remote -v # verify that the origin is removed
git remote add origin <git url>
git fetch origin
git branch -u origin/master
GDPR list:
Austria, Belgium, Bulgaria, Croatia, Cyprus, Czech Republic, Denmark, Estonia, Finland, France, Germany, Greece, Hungary, Ireland, Italy, Latvia, Lithuania, Luxembourg, Malta, Netherlands, Poland, Portugal, Romania, Slovakia, Slovenia, Spain, Sweden, United Kingdom
Other European countries:
Norway, Switzerland, Turkey, Slovenia, Serbia, Bosnia, Albania, Ukraine, Iceland, Belarus, Russia, Moldova, Israel, Azerbaijan, Georgia, Faroe, Islands, Kosovo, Montenegro, Armenia, Monaco, Andorra, San, Marino, Lichtenstein
@tgrrr
tgrrr / MaterialTabsRouter4
Created August 30, 2017 09:48
Material Tabs that control Router 4
import React from 'react';
import {Tabs, Tab} from 'material-ui/Tabs';
import Slider from 'material-ui/Slider';
import { withRouter } from 'react-router';
import { BrowserRouter as Router, Route, withRouter } from 'react-router-dom'
class TabsRouter extends React.Component {
constructor(props) {
super(props);
this.state = {
@tgrrr
tgrrr / karabiner.json
Created August 28, 2017 02:07
Settings to remap windows external keyboard - Karabiner for Mac
{
"global": {
"check_for_updates_on_startup": true,
"show_in_menu_bar": false,
"show_profile_name_in_menu_bar": false
},
"profiles": [
{
"complex_modifications": {
"parameters": {