Skip to content

Instantly share code, notes, and snippets.

View rlewkowicz's full-sized avatar
😃
Idk, things are pretty good right now

Ryan Lewkowicz rlewkowicz

😃
Idk, things are pretty good right now
View GitHub Profile
linkedin.com#?#.job-card-container:has-text(Promoted)
@rlewkowicz
rlewkowicz / bsd_route.go
Created July 29, 2022 13:02
I'm in your global protect, hacking your routes
package main
// The concept of this was borrowed from https://github.com/kayrus/tuncfg.git
// This is a crappy dumbed down rewrite so you can add some hacky routes.
// This is a useful reference for understanding the syscalls. You can add routes that don't
// show as static etc. It's useful for combating global protect.
// https://www.freebsd.org/cgi/man.cgi?query=rtentry
// https://www.freebsd.org/cgi/man.cgi?query=route
# Copyright 2017 The Kubernetes Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
#!/bin/sh
export KEYSTORE_PASSWORD="changeit"
export KEY_PASSWORD="changeit"
openssl pkcs12 -export -in 'yourcer.cer' -inkey *.key -out file.p12 -passin pass:"$KEYSTORE_PASSWORD" -passout pass:"$KEYSTORE_PASSWORD"
keytool -importkeystore -srckeystore file.p12 -destkeystore keystore -deststoretype JKS -deststorepass "$KEYSTORE_PASSWORD" -destkeypass "$KEY_PASSWORD" -srcstorepass "$KEYSTORE_PASSWORD" -srcalias 1 -destalias server-cert
# validate
keytool -list -v -keystore keystore -keypass "$KEY_PASSWORD" -storepass "$KEYSTORE_PASSWORD"%
def LoadImages(self, image, img_size=416, half=False):
img_size = img_size
mode = 'images'
half = half # half precision fp16 images
cap = None
img0 = image # BGR
img, *_ = letterbox(img0, new_shape=img_size)
# Normalize RGB
sudo ros config set rancher.network.interfaces.eth1.address 172.68.1.100/24
sudo ros config set rancher.network.interfaces.eth1.gateway 172.68.1.1
sudo ros config set rancher.network.interfaces.eth1.mtu 1500
sudo ros config set rancher.network.interfaces.eth1.dhcp false
#------------------------------------------------------------------------------#
# OFFICIAL DEBIAN REPOS
#------------------------------------------------------------------------------#
deb-src http://deb.debian.org/debian/ jessie main contrib non-free
deb-src http://deb.debian.org/debian/ jessie-updates main contrib non-free
swarm: docker logs $(docker ps -a -q | head -1)
bootstrap_expect is even number: A cluster with an even number of servers does not achieve optimum fault tolerance. See https://www.consul.io/docs/internals/consensus.html#deployment-table
bootstrap_expect > 0: expecting 4 servers
==> Starting Consul agent...
==> Consul agent running!
Version: 'v1.0.0'
Node ID: 'ea7ea507-e240-4969-a9fc-d49140e89bb6'
Node name: 'docker-swarm1-manager1'
Datacenter: 'dc1' (Segment: '<all>')
Server: true (Bootstrap: false)