Skip to content

Instantly share code, notes, and snippets.

View apetersson's full-sized avatar

Andreas Petersson apetersson

View GitHub Profile
#!/bin/bash
# Anforderungen:
# - Parameterprüfung: Das Skript akzeptiert mindestens einen Parameter (den Basisordner).
# Ein optionaler zweiter Parameter "scan" aktiviert den Scan-Modus, der nur fehlende
# oder falsche DateTimeOriginal Tags anzeigt, ohne Änderungen vorzunehmen.
#
# - Datum aus Ordnernamen extrahieren: Das Skript extrahiert das Datum aus dem Namen
# des Ordners. Unterstützte Formate sind JJJJ-MM-TT und JJJJ-MM, wobei bei Letzterem
#!/bin/bash
# Startverzeichnis als Parameter
if [ -z "$1" ]; then
echo "Verwendung: $0 <Startverzeichnis>"
exit 1
fi
start_dir="$1"
# Funktion zur Umwandlung eines Datumsformats in Unix-Zeit (Epoch)
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
// Interface to access storage of Safe contracts
interface IStorageAccessible {
function getStorageAt(uint256 offset, uint256 length) external view returns (bytes memory);
}
library GuardReader {
// Storage slot for the guard address in a Gnosis Safe contract (from GuardManager.sol)
> are you a stochastic parrot?
gpt-oss:20b
Today at 8:46 PM
Thought for 18 minutes
<think>
The user asks: "are you a stochastic parrot?" This likely refers to the phrase used in AI ethics about language models being "stochastic parrots" — that is, models that generate outputs based on patterns learned from data. So the assistant should explain what a stochastic parrot means, and clarify its role. The user likely expects an answer like: Yes, I am a language model trained on a large dataset, generating text based on patterns; I don't understand, etc. Provide nuance: I am a large language model that uses probabilistic modeling, not truly conscious, but can simulate understanding, but it's more than a simple parrot because I use context and produce novel output. But still, I am essentially a statistical model. So the answer should explain the concept, the criticism, the mitigation.
#!/bin/bash
# Anforderungen:
# - Parameterprüfung: Das Skript akzeptiert mindestens einen Parameter (den Basisordner).
# Ein optionaler zweiter Parameter "scan" aktiviert den Scan-Modus, der nur fehlende
# oder falsche DateTimeOriginal Tags anzeigt, ohne Änderungen vorzunehmen.
#
# - Datum aus Ordnernamen extrahieren: Das Skript extrahiert das Datum aus dem Namen
# des Ordners. Unterstützte Formate sind JJJJ-MM-TT und JJJJ-MM, wobei bei Letzterem
import Safe, {
ContractNetworkConfig,
ContractNetworksConfig,
SafeAccountConfig,
SafeFactoryConfig,
SafeProvider
} from "@safe-global/protocol-kit";
import { SafeConfigWithPredictedSafe } from "@safe-global/protocol-kit/dist/src/types/safeConfig";
import { SafeConfig } from "@safe-global/protocol-kit/dist/src/types";
import { SafeVersion } from "@safe-global/safe-core-sdk-types";
#!/bin/bash
# Requirements:
# - Parameter checking: The script accepts at least one parameter (the base folder).
# An optional second parameter "scan" activates the scan mode, which only shows missing
# or incorrect DateTimeOriginal tags, without making any changes.
#
# - Extract date from folder names: The script extracts the date from the name
# of the folder. Supported formats are YYYY-MM-DD and YYYY-MM, where for the latter
# the day 01 is automatically added.

Dockerfile for signal-cli

Creating a Dockerfile for signal-cli provides an isolated environment where you can run the tool without polluting your main system with its dependencies. Here's a basic Dockerfile for this purpose:

# Use an official Java base image. Since signal-cli requires at least JRE 17, we'll use that.
FROM openjdk:17-slim

# Set the version of signal-cli you want to install
ENV SIGNAL_CLI_VERSION=x.y.z

Keybase proof

I hereby claim:

  • I am apetersson on github.
  • I am petersson (https://keybase.io/petersson) on keybase.
  • I have a public key ASBiXoYWczDoq0z6N1Km1Afy5Rb6EaMf7YA0V0BtiWp4JAo

To claim this, I am signing this object: