Skip to content

Instantly share code, notes, and snippets.

View damemi's full-sized avatar
🍻

Mike Dame damemi

🍻
View GitHub Profile
func TestErrorStatusForDeletedNode(t *testing.T) {
predicates := map[string]algorithmpredicates.FitPredicate{"true": truePredicate}
nodes := makeNodeList([]string{"1", "2", "3"})
g := makeScheduler(predicates, nodes)
snapShot := g.cache.Snapshot()
snapShot.Nodes["2"] = nil
//newSnapshot := nodeinfosnapshot.NewSnapshot(snapShot.Nodes)
newSnapshot := nodeinfosnapshot.NewEmptySnapshot()
newSnapshot.NodeInfoMap = map[string]*schedulernodeinfo.NodeInfo{
"1": snapShot.Nodes["1"],
@damemi
damemi / crd-dns
Created October 7, 2019 16:53
crd
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
name: dnses.config.openshift.io
spec:
group: config.openshift.io
names:
kind: DNS
listKind: DNSList
plural: dnses
@damemi
damemi / black.css
Created November 5, 2018 16:09
Rehosted slack dark theme
body { background: #222; color: #e6e6e6; }
a { color: #949494; }
a:link, a:visited { color: #949494; }
a:hover, a:active, a:focus { color: #c7c7c7; }
hr { border-bottom: 1px solid #424242; border-top: 1px solid #222; }
@damemi
damemi / accept-all.js
Last active December 11, 2015 05:08
Accept all space invitations on Assembla
jQuery.each(jQuery("#notifications-list li").find('a:[text="Accept"]'), function() {
jQuery.ajax({type:"POST", url:jQuery(this).attr("href")}); })