Skip to content

Instantly share code, notes, and snippets.

@jvaleski
jvaleski / auth_header_test.dart
Created March 30, 2024 22:15
AWS S3 HTTP Authorization header creation in Dart/Flutter
import 'package:crypto/crypto.dart';
import 'dart:convert';
import 'package:test/test.dart';
import 'package:flutter_dotenv/flutter_dotenv.dart';
import 'package:intl/intl.dart';
import 'package:http/http.dart' as http;
Map<String, String> createAWSHTTPAuthHeaders(String key, String secret, String bucket, String path, String method) {
final now = DateTime.now().toUtc();
String formattedDate = DateFormat('E, d MMM yyyy HH:mm:ss').format(now) + " +0000";
@jvaleski
jvaleski / AddBuilding
Last active September 21, 2020 04:05
// pseudo code for a kiddo project
void addBuilding(CUBuilding *previous, string name) {
tempBuilding = new CUBuilding();
tempBuilding->name = name;
tempBuilding->next = NULL;
if (head == NULL) {
head = tempBuilding;
head->previous = NULL;

Keybase proof

I hereby claim:

  • I am jvaleski on github.
  • I am jvaleski (https://keybase.io/jvaleski) on keybase.
  • I have a public key whose fingerprint is 00E5 CC00 62FB 75E1 0A89 F037 670A 293C 1220 45D4

To claim this, I am signing this object:

Verifying my Blockstack ID is secured with the address 1MtyhQRYnB63kKekWGwypsYURXJceB4MrB https://explorer.blockstack.org/address/1MtyhQRYnB63kKekWGwypsYURXJceB4MrB
Verifying I am +jvaleski on my passcard. https://onename.com/jvaleski
@jvaleski
jvaleski / gist:1472829
Created December 13, 2011 16:38
this is my test description
{'test', 'me'}