For excessively paranoid client authentication.
Updated Apr 5 2019:
because this is a gist from 2011 that people stumble into and maybe you should AES instead of 3DES in the year of our lord 2019.
some other notes:
package org.example.basicapp; | |
import com.amazonaws.services.sagemakerruntime.AmazonSageMakerRuntime; | |
import com.amazonaws.services.sagemakerruntime.AmazonSageMakerRuntimeClientBuilder; | |
import com.amazonaws.services.sagemakerruntime.model.InvokeEndpointRequest; | |
import com.amazonaws.services.sagemakerruntime.model.InvokeEndpointResult; | |
import java.nio.ByteBuffer; | |
public class App |
package logging | |
import ( | |
"github.com/rs/zerolog" | |
"github.com/rs/zerolog/log" | |
"gopkg.in/natefinch/lumberjack.v2" | |
"os" | |
"path" | |
"io" | |
) |
Setting a password for the postgres user | |
On Linux systems, there is no default password set. | |
To set the default password: | |
Run the psql command from the postgres user account: | |
sudo -u postgres psql postgres | |
Set the password: |
package main | |
import ( | |
"context" | |
"flag" | |
"fmt" | |
"log" | |
"net/http" | |
"os" | |
"os/signal" |
#!/bin/bash | |
# Copyright © 2017 Google Inc. | |
# 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 |
import ( | |
"crypto/md5" | |
"encoding/hex" | |
) | |
func GetMD5Hash(text string) string { | |
hasher := md5.New() | |
hasher.Write([]byte(text)) | |
return hex.EncodeToString(hasher.Sum(nil)) | |
} |
# Add the following 'help' target to your Makefile | |
# And add help text after each target name starting with '\#\#' | |
help: ## Show this help. | |
@fgrep -h "##" $(MAKEFILE_LIST) | fgrep -v fgrep | sed -e 's/\\$$//' | sed -e 's/##//' | |
# Everything below is an example | |
target00: ## This message will show up when typing 'make help' | |
@echo does nothing |
/*! | |
* jQuery TextChange Plugin | |
* http://www.zurb.com/playground/jquery-text-change-custom-event | |
* | |
* Copyright 2010, ZURB | |
* Released under the MIT License | |
*/ | |
(function ($) { | |
$.event.special.textchange = { |