Skip to content

Instantly share code, notes, and snippets.

@platypii
platypii / lambda-hyparquet.js
Last active January 2, 2025 18:50
Hyparquet Lambda function to generate parquet file metadata when a file is uploaded to S3
import { S3Client, GetObjectCommand } from '@aws-sdk/client-s3'
const s3 = new S3Client()
import { parquetMetadata, toJson } from 'hyparquet'
export async function handler(event) {
console.log('Event received:', JSON.stringify(event, null, 2))
// The event structure can contain multiple records if multiple files are uploaded at once.
for (const record of event.Records) {
const bucket = record.s3.bucket.name
@EpokK
EpokK / ngPlaceholder.js
Last active December 19, 2015 02:38
Placeholder directive : ngPlaceholder (https://twitter.com/ririlepanda)
app.directive('ngPlaceholder', function() {
return {
restrict: 'A',
require: 'ngModel',
link: function(scope, element, attr, ctrl) {
var value;
var placehold = function () {
element.val(attr.placehold)
@brandonb927
brandonb927 / osx-for-hackers.sh
Last active March 5, 2026 10:16
OSX for Hackers: Yosemite/El Capitan Edition. This script tries not to be *too* opinionated and any major changes to your system require a prompt. You've been warned.
#!/bin/sh
###
# SOME COMMANDS WILL NOT WORK ON macOS (Sierra or newer)
# For Sierra or newer, see https://github.com/mathiasbynens/dotfiles/blob/master/.macos
###
# Alot of these configs have been taken from the various places
# on the web, most from here
# https://github.com/mathiasbynens/dotfiles/blob/5b3c8418ed42d93af2e647dc9d122f25cc034871/.osx
package await
import java.util.concurrent.Callable
import java.util.concurrent.Executors
object BlockingDemo extends App {
val execSvc = Executors.newSingleThreadExecutor()
val worker = new MeaningOfLife()