Skip to content

Instantly share code, notes, and snippets.

View lsauer's full-sized avatar
🎯
Focusing

Lorenz Lo Sauer lsauer

🎯
Focusing
View GitHub Profile
@lsauer
lsauer / k8UpdateRollback.sh
Created October 2, 2020 06:47 — forked from joshy91/k8UpdateRollback.sh
Deployments, Rolling Update, Rollback
#!/bin/bash
#Deployments, Rolling Update, Rollback
#Nginx deployment yaml
echo “apiVersion: apps/v1beta2
kind: Deployment
metadata:
name: nginx-deployment
namespace: default
spec:
options(stringsAsFactors=FALSE)
library(limma)
library(parallel)
# fn returns the statistic of interest from a limma fit object.
bootstrip = function(mat, mod, fn, iterations=100, p_samples=0.5, mc.cores=12){
stopifnot(nrow(mod) == ncol(mat))
ta = mclapply(1:iterations, function(core_i){
idx = sample.int(ncol(mat), p_samples * ncol(mat), replace=TRUE)
@lsauer
lsauer / gist:1210023
Created September 11, 2011 19:45 — forked from timbroder/gist:1209944
insert update url rewrite
#INSERT INTO `core_url_rewrite` (`store_id`, `category_id`, `product_id`, `id_path`, `request_path`, `target_path`, `is_system`)
SELECT 1 AS `store_id`,
`sub`.`category_id`,
`sub`.`entity_id` AS `product_id`,
CONCAT('product', '/', `entity_id`, '/', `category_id`) AS `id_path`,
`value` AS `request_path`,
CONCAT('catalog/product/view/id/', `entity_id`, '/category/', `category_id`) AS `target_path`,
1 AS `is_system`
FROM
(SELECT