run
npx https://gist.github.com/joelhooks/c585cdab12b986fc7f1a057796e99b76
import dotenv from "dotenv"; | |
import Anthropic from "@anthropic-ai/sdk"; | |
import { setTimeout } from "timers/promises"; | |
import * as fs from "fs/promises"; | |
import { getSession } from "./neo4j"; | |
// Configuration and Initialization | |
dotenv.config(); | |
const anthropic = new Anthropic({ |
import {publicProcedure, router} from '@skillrecordings/skill-lesson' | |
import {isEmpty} from 'lodash' | |
import {getToken} from 'next-auth/jwt' | |
import {getSubscriberFromCookie} from '@skillrecordings/skill-lesson/utils/ck-subscriber-from-cookie' | |
export const offerRouter = router({ | |
getNextOffer: publicProcedure.query(async ({ctx}) => { | |
const token = await getToken({req: ctx.req}) | |
const subscriber = await getSubscriberFromCookie(ctx.req) |
#!/bin/bash | |
# https://gist.github.com/julianxhokaxhiu/c0a8e813eabf9d6d9873 | |
# Improved as per feedback from @pascal - https://gist.github.com/julianxhokaxhiu/c0a8e813eabf9d6d9873#gistcomment-3086462 | |
# brew install optipng pngcrush jpegoptim | |
find . -type f -iname "*.png" -exec optipng -nb -nc {} \; | |
find . -type f -iname "*.png" -exec pngcrush -rem gAMA -rem alla -rem cHRM -rem iCCP -rem sRGB -rem time -ow {} \; | |
find . -type f \( -iname "*.jpg" -o -iname "*.jpeg" \) -exec jpegoptim -f --strip-all {} \; |
### egghead.io Individual Contributor License Agreement | |
Thank you for your interest in contributing to open source software projects (“Projects”) made available by egghead.io, LLC or its affiliates (“egghead.io”). This Individual Contributor License Agreement (“Agreement”) sets out the terms governing any source code, object code, bug fixes, configuration changes, tools, specifications, documentation, data, materials, feedback, information or other works of authorship that you submit or have submitted, in any form and in any manner, to egghead.io in respect of any of the Projects (collectively “Contributions”). If you have any questions respecting this Agreement, please contact [email protected]. | |
You agree that the following terms apply to all of your past, present and future Contributions. Except for the licenses granted in this Agreement, you retain all of your right, title and interest in and to your Contributions. | |
**Copyright License.** You hereby grant, and agree to grant, to egghead.io a non-exclu |
# -*- coding: utf-8 -*- | |
""" | |
Builds epub book out of Paul Graham's essays: http://paulgraham.com/articles.html | |
Author: Ola Sitarska <[email protected]> | |
This script requires python-epub-library: http://code.google.com/p/python-epub-builder/ | |
""" | |
import re, ez_epub, urllib2, genshi |
package org.robotlegs.utilities.remote | |
{ | |
import com.adobe.serializers.json.JSONDecoder; | |
import mx.collections.ArrayCollection; | |
public class JsonRemoteService extends RemoteServiceBase | |
{ | |
public function JsonRemoteService(rootURL:String = "") | |
{ |