This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#### |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import logging | |
import socket | |
log = logging.getLogger('udp_server') | |
def udp_server(host='127.0.0.1', port=1234): | |
s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) | |
s.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let Client = require('azure-iothub').Client; | |
let Message = require('azure-iot-common').Message; | |
let names = require('docker-names'); | |
let IOTHUB_CONNSTR_SERVICE = process.env.IOTHUB_CONNSTR_SERVICE; | |
let serviceClient = Client.fromConnectionString(IOTHUB_CONNSTR_SERVICE); | |
module.exports = function(context, req) { | |
context.log('JavaScript HTTP trigger function processed a request.'); | |
let intent = req.body.request.intent.name; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# See https://github.com/kubernetes/kubernetes/issues/33664 | |
if [[ $# -eq 0 ]]; then | |
printf 'Pass deployment name as argument.\n\n' | |
kubectl get deployment | |
exit 1 | |
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"SchemaVersion": 1, | |
"Name" : "SeeedOLED_I2C", | |
"ComponentId" : "4595840c-94e8-48ea-9bd2-1b8167015973", | |
"EntryPoint": "/bin/app", | |
"CmdArgs": [], | |
"Capabilities": { | |
"AllowedConnections": [], | |
"AllowedTcpServerPorts": [], | |
"AllowedUdpServerPorts": [], |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Error: release prometheus-operator failed: customresourcedefinitions.apiextensions.k8s.io | |
# "alertmanagers.monitoring.coreos.com" already exists | |
# https://github.com/coreos/prometheus-operator/issues/2229 | |
kubectl delete crd prometheusrules.monitoring.coreos.com | |
kubectl delete crd servicemonitors.monitoring.coreos.com | |
kubectl delete crd alertmanagers.monitoring.coreos.com |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
helm ls | grep FAILED | awk '{print $1}' | xargs helm delete --purge --debug |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ openssl s_time -connect amisecure.azurewebsites.net:443 -www / -cipher 'RSA' -new | |
Collecting connection statistics for 30 seconds | |
***************************************************************************************************************************** | |
125 connections in 0.29s; 431.03 connections/user sec, bytes read 366875 | |
125 connections in 31 real seconds, 2935 bytes read per connection |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[package] | |
name = "iron" | |
version = "0.1.0" | |
authors = ["snobu <foo@snobu.org>"] | |
edition = "2018" | |
[dependencies] | |
iron = "*" | |
rustc-serialize = "*" | |
chrono = "*" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Launch VS Code with 'code' or 'code <path>' from Fish Shell | |
function code | |
set location "$PWD/$argv" | |
open -n -b "com.microsoft.VSCode" --args $location | |
end |