This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for f in (find ~ -type d -name node_modules -prune -print); du -sh $f; end | gsort -h |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from typing import Any, AsyncIterator, Dict, Iterator, List, Optional | |
from langchain_core.language_models import BaseChatModel, SimpleChatModel | |
from langchain_core.load import dumpd, dumps, load, loads | |
from langchain_core.messages import AIMessage, AIMessageChunk, BaseMessage, HumanMessage | |
from langchain_core.outputs import ChatGeneration, ChatGenerationChunk, ChatResult | |
from langchain_openai import ChatOpenAI, OpenAIEmbeddings | |
import requests | |
import functions_framework |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Column, DataType, Model, Table } from "sequelize-typescript"; | |
// Implements storage for Automerge history entries (incremental changes and snapshots). | |
// https://automerge.org/docs/under-the-hood/storage/#the-storage-model | |
@Table({ | |
// https://github.com/sequelize/sequelize-typescript/issues/105#issuecomment-832075653 | |
indexes: [ | |
{ | |
name: "automerge_entry_key", | |
fields: ["key0", "key1", "key2"], |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
' This macro creates slides from plain text on your clipboard. | |
' Two consecutive line breaks begin a new slide. | |
' New slides will be duplicates of the selected slide, | |
' which must contain a single text box and nothing else. | |
' | |
' Usage: | |
' 1. Prepare plain text paragraphs of your slide content | |
' 2. Copy the text to your clipboard | |
' 3. Select a slide that contains a single text box with desired formatting | |
' 4. Run ParagraphsToSlides as a macro |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
struct Proc(*T, R) | |
def curry | |
{% begin %} | |
{% for i in 0...T.size %} | |
->(arg_{{i}} : {{T[i]}}) { | |
{% end %} | |
self.call( | |
{% for i in 0...T.size %} | |
arg_{{i}}, | |
{% end %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
nc -l $IN_PORT | bash -c "while true; do read msg; osascript -e \" display notification \\\"\$msg\\\" \" & done" | |
nc $OUT_ADDRESS $OUT_PORT |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Either use from the command line, or put in an Automator workflow | |
# that takes files as input and save it as a Quick Action. | |
# For bonus points, assign a nice keyboard shortcut. | |
for file | |
do | |
xattr -r -d com.apple.quarantine "$file" | |
open "$file" | |
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include<stdio.h> | |
#include<math.h> | |
int | |
main | |
() | |
{; | |
int | |
x= | |
(( | |
void |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
script_canonical_name='?' | |
file="${1:-$(pwd)}" | |
if [[ -h "$file" ]] | |
then | |
echo "$script_canonical_name: is a link to $(readlink "$file")" | |
file=$(realpath "$file") | |
fi |
NewerOlder