Export channel messages from Teams for Slack CSV import
  1. Create an Entra App in App Registrations.
  2. Go to API permissions and give all the necessary permissions via Microsoft Graph. Some permissions might be superfluous. You’ll figure it out. :)
  3. Generate a client secret and store it somewhere safe — you only see the value once.
  4. From a terminal, exchange the client credentials for a Graph access token, then call /teams/{team-id}/channels/{channel-id}/messages?$top=50 and page through @odata.nextLink until you’ve drained the channel.
curl -X POST "https://login.microsoftonline.com/$TENANT_ID/oauth2/v2.0/token" \
  -H "Content-Type: application/x-www-form-urlencoded" \
  -d "client_id=$CLIENT_ID&client_secret=$CLIENT_SECRET&scope=https://graph.microsoft.com/.default&grant_type=client_credentials"
  1. Map each message to a Slack-compatible CSV row: timestamp,user,channel,text. Slack’s importer is forgiving — keep the columns simple and it ingests.
TIL: How to quickly check which AWS regions support SES using a Bash script

Although it has improved lately for some services, AWS is still notoriously unfriendly when it comes to checking which services are activated and running across different regions. Here’s a script you can run in the console to quickly see which regions have SES (Simple Email Service) available:

for region in $(aws ec2 describe-regions --query "Regions[].RegionName" --output text); do
  echo -n "$region: "
  aws ses get-account --region "$region" >/dev/null 2>&1 \
    && echo "supported" \
    || echo "not supported"
done

It walks every enabled region, hits ses get-account, and prints support status. Handy when you’re standing up a new SES sender and need to know which region to bind your domain to.

TypeScript `satisfies` vs `as`

as lies. satisfies checks.

const palette = {
  green: '#034c3c',
  orange: '#ec4e20',
} as Record<string, string>;
// palette.green is now `string` — we lost the literal type.

const palette2 = {
  green: '#034c3c',
  orange: '#ec4e20',
} satisfies Record<string, string>;
// palette2.green is `'#034c3c'` — literal preserved AND shape verified.

Use satisfies when you want the literal types kept and the shape checked. Use as only when you genuinely know more than the compiler — and almost never on object literals.

0%