Skip to content

Instantly share code, notes, and snippets.

View M1ke's full-sized avatar

Mike Lehan M1ke

View GitHub Profile
@Ocramius
Ocramius / psalm-compendium.php
Last active April 23, 2025 01:22
A small compendium of what is possible with `vimeo/psalm` 3.9.x to add some decent type system features to PHP
<?php
// -- types are a compile-time propagated concept
// https://psalm.dev/r/338f74a96c
class TheType
{
/** @var string */
public $foo = 'bar';
}
@dixitm20
dixitm20 / lambda_function.py
Last active August 17, 2021 15:43
Truncate Dynamodb Tables
import json
import boto3 as boto3
import os
dynamodb = boto3.resource('dynamodb')
def truncate_table(table_name):
table = dynamodb.Table(table_name)
scan_kwargs = {