Skip to content

Instantly share code, notes, and snippets.

View scosman's full-sized avatar
⌨️

Steve Cosman scosman

⌨️
View GitHub Profile
@scosman
scosman / 1 - Animating SVGs with Sonnet 3.5
Last active November 12, 2024 21:53
Sonnet 3.5 Fun - SVG Animation
I used sonnet 3.5 and Cursor to created a logo which animates on entry.
Input file: initial_logo.svg (below)
Prompt:
```
Let's add a start up animation to this SVG
Make it feel like feel like the logo starts broken, then fixes itself piece by piece. In a playful style like pixar.
```
{"label":"Coverage","message":"92%","schemaVersion":1,"color":"brightgreen"}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
helloworld
@scosman
scosman / dash.html
Created August 30, 2012 13:50
Kobo stats
<html>
<head>
<script type='text/javascript' src='https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js'></script>
<script type='text/javascript'>
$(function()
{
$('#goBtn').click(function()
{
getStats();
setInterval(getStats, 300000); // 5 mins
@scosman
scosman / gist:2499922
Created April 26, 2012 14:22
Threaded delayed_job
# Threaded delayed_job. Useful for Heroku where each process/dyno costs money.
# run "rake jobs:threaded_work[4]" to start 4 worker threads
namespace :jobs do
desc "Start several delayed_job workers."
task :threaded_work, [:num_workers] => :environment do |t,args|
args.with_defaults(:num_workers => 1)
threads = []
workers = []
workersSemaphore = Mutex.new