Skip to content

Instantly share code, notes, and snippets.

View leolobato's full-sized avatar

Leo Lobato leolobato

View GitHub Profile
@adamshostack
adamshostack / Claude 3 Opus prompt
Last active May 29, 2024 09:13
Spotify playlists from csv files. Useful for music festivals.
# Claude Opus 3 wrote most of the code below (I edited it as I went). After I was happy, I prompted
# "write me a prompt that will make you emit that code with all the relevant decisions we've made along the way."
# Claude produced the following:
I have a Spotify account and I want to create a Python script that does the following:
Reads a list of artist names from a file named after the artist. For example, if the file is named "artists.txt", the script should create a playlist named "artists".
For each artist in the list, the script should:
Search for an exact match of the artist name on Spotify.
If an exact match is found and the artist has albums, add the tracks from their latest album to the playlist.
@magnetikonline
magnetikonline / README.md
Last active June 22, 2024 06:03
List all Git repository objects by size.

List all Git repository objects by size

Summary

Bash script which will:

  • Iterate all commits made within a Git repository.
@takuoka
takuoka / SKTimingFunction.swift
Last active May 28, 2023 03:33
This is the TimingFunction class like CAMediaTimingFunction available in AnyWhere also SpriteKit. All the cool animation curves from `CAMediaTimingFunction` but it is limited to use with CoreAnimation. See what you can do with cubic Bezier curves here: http://cubic-bezier.com
//
// SKTimingFunction.swift
// Pods
//
// Created by Takuya Okamoto on 2015/10/06.
//
//
// inspired by https://gist.github.com/raphaelschaad/6739676
@steipete
steipete / AppDelegate.m
Last active December 13, 2015 17:29
Hook onto NSNotificationCenter to see all notifications.
[[NSNotificationCenter defaultCenter] addObserverForName:nil object:nil queue:nil usingBlock:^(NSNotification *note) {
NSLog(@"%@: %@", note.name, note.userInfo);
}];
@zwaldowski
zwaldowski / NSObject+Blocks.h
Created May 4, 2011 12:08
Perform blocks with delays and cancellation
//
// NSObject+Blocks.h
// Filemator
//
// Created by Zachary Waldowski on 4/12/11.
// Copyright 2011 Dizzy Technology. All rights reserved.
//
@interface NSObject (Blocks)