Skip to content

Instantly share code, notes, and snippets.

View stfsy's full-sized avatar
🎯
Focusing

Stefan Pfaffel stfsy

🎯
Focusing
View GitHub Profile
import hvac
from hvac.api.secrets_engines.kv_v2 import KvV2
c = hvac.Client()
kv2 : KvV2 = c.secrets.kv.v2
create_response = kv2.create_or_update_secret(
path='foo',
secret=dict(baz='bar'),
from hvac.api.secrets_engines.active_directory import ActiveDirectory
from hvac.api.secrets_engines.aws import Aws
from hvac.api.secrets_engines.azure import Azure
from hvac.api.secrets_engines.consul import Consul
from hvac.api.secrets_engines.database import Database
from hvac.api.secrets_engines.gcp import Gcp
from hvac.api.secrets_engines.identity import Identity
from hvac.api.secrets_engines.kv import Kv
from hvac.api.secrets_engines.kv_v1 import KvV1
from hvac.api.secrets_engines.kv_v2 import KvV2
import hvac
client = hvac.Client()
create_response = client.secrets.kv.v2.create_or_update_secret(
path='foo',
secret=dict(baz='bar'),
)
Supplier<String> supplier = () -> service.sayHelloWorld(param1);
String result = Decorators.ofSupplier(supplier)
.withBulkhead(Bulkhead.ofDefaults("name"))
.withCircuitBreaker(CircuitBreaker.ofDefaults("name"))
.withRetry(Retry.ofDefaults("name"))
.withFallback(asList(CallNotPermittedException.class, BulkheadFullException.class),
throwable -> "Hello from fallback")
.get()
import { getTraceIdFromLocalStorage } from "./local-storage.js"
export default async (name, callback) => {
const now = Date.now()
const result = callback.apply()
if (result && typeof result.finally === 'function') {
return result.finally(logExecutionTime(now, name))
} else {
logExecutionTime(now, name)
[
{
"alias": "Developer machine - pun intended"
"created_at": "2023-07-01",
"created_by": "2585cf7c-0561-4f40-9186-1e5380f20e49",
"expires_at": "...",
"permissions": {
"api_keys": {
"action": "read",
"targets": []
{
"alias": "Developer machine - pun intended"
"created_at": "...",
"created_by": "...",
"expires_at": "...",
"permissions": {
"api_keys": {
"action": "read",
"targets": [
"2c62c6ef-4704-431c-b27b-d587af614898",
{
"first_name": "Max",
"second_name": "%%$$&&",
"birthday": "drop database"
}
deployments/
β”œβ”€β”€ france/
β”‚ β”œβ”€β”€ stage-dev/
| β”‚ β”œβ”€β”€ checkout/
β”‚ β”‚ β”‚ └── application.yml
β”‚ β”‚ β”œβ”€β”€ dashboard/
β”‚ β”‚ β”‚ └── application.yml
β”‚ β”‚ β”œβ”€β”€ login/
| β”‚ | └── application.yml
| | └── tracking.csv
@stfsy
stfsy / jsconfig.json
Created January 8, 2022 07:28
JSConfig for VSCode with Vetur with Vue.js
{
"include": [
"./src/**/*"
],
"compilerOptions": {
"checkJs": true,
"baseUrl": ".",
"paths": {
"@/*": [
"src/*"