Skip to content

Instantly share code, notes, and snippets.

View jasondavis's full-sized avatar

Jason Davis jasondavis

View GitHub Profile
@business24ai
business24ai / save_note_to_obsidian.py
Created December 31, 2023 11:29
An AutoGen Studio skill to store markdown content to our second brain obsidian
# A skill to store markdown content to our second brain obsidian
import os
def store_note_to_obsidian(filename, content):
"""
Store markdown content to our second brain in a local Obsidian vault
:param filename: str, filename of the note
:param content: str, content of the note as markdown
@Omerr
Omerr / git lol.md
Last active March 11, 2024 06:09
git lol - an alias to Git that shows the commit graph in a pretty format

log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit

To configure as an alias git lol:

git config --global alias.lol "log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)&lt;%an&gt;%Creset' --abbrev-commit"

@dannberg
dannberg / obsidian-meeting-moc.txt
Last active February 20, 2024 06:22
Dann Berg's Meeting MOC document for Obsidian. Full instructions for implementation here: https://dannb.org/blog/2023/obsidian-meeting-note-template/. See the YouTube tutorial here: https://youtu.be/Ud16HOQoS5Q
[[+Home]] %% tags:: #MOC %%
# Meetings MOC
Meetings are timestamped events with other people, where information is exchanged and collected. Meeting notes are intrinsically ephemeral. They're stored in a separate Space than other Umami notes (`Timestamps/Meetings`) and rarely reviewed. If there's information in a meeting that needs to be accessed later, it should be moved into a more evergreen note in the Umami folder.
**Template:** [[Template, Meeting]]
```meta-bind-button
label: New Meeting
hidden: false
@alangrainger
alangrainger / Copy direct link to Gmail email.md
Last active April 7, 2024 11:17
Copy a direct link to a Gmail email to your clipboard
@Normal-Tangerine8609
Normal-Tangerine8609 / progress-circle.js
Last active February 16, 2024 18:28
This is a function that allows you to create simple circular progress bars for widgets. It creates the image of the progress circle using `WebView` and the canvas element. The image is then set to the background image of a stack with padding applied so you can put any widget element within the circle.
/*
* progressCircle(on: Stack or Widget, value: number, colour: string, background: string, size: number, barWidth: number) : Promise<Stack>
*
* PARAMS
* on - the stack or widget to add the progress circle to
* value - a number between 1 and 100 to be the circle percentage or a number between 0 and 1 to be the circle percentage
* colour - a HTML supported (hex, rgb, hsl) colour for the progress of the circle. Alternitively, it can be two HTML supported colours seperated by a hyphen (white-black) for the first colour to be active on light mode and second on dark mode
* background - a HTML supported (hex, rgb, hsl) colour for the unfilled progress of the circle. Alternitively, it can be two HTML supported colours seperated by a hyphen (white-black) for the first colour to be active on light mode and second on dark mode
* size - the size of the progress circle
* barWidth - the width of the circular progress bar
@karpathy
karpathy / stablediffusionwalk.py
Last active March 29, 2024 09:33
hacky stablediffusion code for generating videos
"""
stable diffusion dreaming
creates hypnotic moving videos by smoothly walking randomly through the sample space
example way to run this script:
$ python stablediffusionwalk.py --prompt "blueberry spaghetti" --name blueberry
to stitch together the images, e.g.:
$ ffmpeg -r 10 -f image2 -s 512x512 -i blueberry/frame%06d.jpg -vcodec libx264 -crf 10 -pix_fmt yuv420p blueberry.mp4
@antiops
antiops / tiktok-download.ahk
Created July 31, 2022 10:32
AutoHotKey script to automatically download TikTok videos that are copied to your clipboard
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
#Persistent
; Requires yt-dlp
; You might need to change the '$HOME' and '$USERNAME' if they dont work
; $HOME = 'C:\Users\YourUsername'; $USERNAME is your windows username
ClipChanged(Type) {
If InStr(Clipboard, "https://www.tiktok.com/@")
Or InStr(Clipboard, "https://tiktok.com/@") {
@alangrainger
alangrainger / getGooglePhoto.js
Last active November 4, 2022 11:12
Insert a personal Google Photo into an Obsidian entry, either as a link, a remote image, or a locally stored thumbnail
<%*
// You can create any number of resolution options that you want to select from
const resolutions = [
{
name: 'Thumbnail', // A friendly name
res: [350, 250] // Width by height. The image will maintain aspect ratio
},
{
name: 'Large',
res: [1280, 720]
@G33kDude
G33kDude / EasyStreamDeck.ahk
Created March 12, 2022 19:20
Launch AutoHotkey code from a StreamDeck efficiently using GET requests
#NoEnv
#Persistent
SetBatchLines, -1
#Include <Socket>
/*
Launch AutoHotkey code from a StreamDeck efficiently using GET requests