- Confidentiality
- Resources should be protected from unauthorized access
- Prioritized by governments
- Concepts
- Sensitivity
- How harmful is disclosure
- Sensitivity
- Discretion
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
#!/usr/bin/env bash | |
# Output file name | |
timestamp=$(date +"%Y%m%d%H%M%S") | |
output_file="password_policy_audit_$(md5hash $timestamp).csv" | |
# Header for the CSV file | |
echo "Timestamp,User,Password Length,Password Expiry,Password Complexity,Password History,Password Auto Lock,Session Timeout,Root Enforcement" > "$output_file" | |
# Check if sudo is available |
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
/** | |
* Custom hook for dynamically resizing a textarea to fit its content. | |
* @param {React.RefObject<HTMLTextAreaElement>} textareaRef - Reference to the textarea element. | |
* @param {string} textContent - Current text content of the textarea. | |
* @param {number} maxHeight - Optional: maxHeight of the textarea in pixels. | |
*/ | |
import { useEffect } from "react"; | |
export const useDynamicTextareaSize = ( |
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
#!/usr/bin/env python | |
## Tiny Syslog Server in Python. | |
## | |
## This is a tiny syslog server that is able to receive UDP based syslog | |
## entries on a specified port and save them to a file. | |
## That's it... it does nothing else... | |
## There are a few configuration parameters. | |
LOG_FILE = 'youlogfile.log' |
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 axios from "axios"; | |
class HttpService { | |
constructor() { | |
const token = window.localStorage.getItem("token"); | |
const service = axios.create({ | |
baseURL: process.env.REACT_APP_API_URL, | |
headers: token | |
? { | |
Authorization: `Bearer ${token}`, |
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 { useCallback, useState } from "react"; | |
// Custom hook to copy text to clipboard | |
const useCopyToClipboard = (timeoutDuration: number = 1000) => { | |
const [copied, setCopied] = useState(false); | |
const [error, setError] = useState<Error | null>(null); | |
const copyToClipboard = useCallback( | |
async (text: string) => { | |
try { |
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 { useCallback, useEffect, useRef, useState } from "react"; | |
/** | |
* Custom React hook for double-click confirmation for critical actions. | |
* | |
* @param action - The action to be executed on the second click. | |
* @param timeout - Time in milliseconds to reset the unlocked state. | |
* @returns The current unlocked state and the trigger function. | |
*/ | |
const useConfirmation = (action: () => void, timeout: number = 5000) => { |
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 { useCallback, useEffect, useRef } from "react"; | |
export function useLongPress({ | |
delay, | |
onLongPress, | |
onClick, | |
onCancel, | |
onFinish, | |
onStart, | |
}: { |
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
# Copyright 2019, Alexander Hass | |
# https://www.hass.de/content/setup-microsoft-windows-or-iis-ssl-perfect-forward-secrecy-and-tls-12 | |
# | |
# After running this script the computer only supports: | |
# - TLS 1.2 | |
# | |
# Version 3.0.1, see CHANGELOG.txt for changes. | |
Write-Host 'Configuring IIS with SSL/TLS Deployment Best Practices...' | |
Write-Host '--------------------------------------------------------------------------------' |
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
<div class="bg-white border-slate-100 dark:bg-slate-800 dark:border-slate-500 border-b rounded-t-xl p-4 pb-6 sm:p-10 sm:pb-8 lg:p-6 xl:p-10 xl:pb-8 space-y-6 sm:space-y-8 lg:space-y-6 xl:space-y-8"> | |
<div class="flex items-center space-x-4"> | |
<img src="/full-stack-radio.png" alt="" width="88" height="88" class="flex-none rounded-lg bg-slate-100" /> | |
<div class="min-w-0 flex-auto space-y-1 font-semibold"> | |
<p class="text-cyan-500 dark:text-cyan-400 text-sm leading-6"> | |
<abbr title="Episode">Ep.</abbr> 128 | |
</p> | |
<h2 class="text-slate-500 dark:text-slate-400 text-sm leading-6 truncate"> | |
Scaling CSS at Heroku with Utility Classes |
NewerOlder