<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Sarah Kapelner on Medium]]></title>
        <description><![CDATA[Stories by Sarah Kapelner on Medium]]></description>
        <link>https://medium.com/@sbkapelner?source=rss-fe7257e2b5e8------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*EUKWO4aYw8S6okUH</url>
            <title>Stories by Sarah Kapelner on Medium</title>
            <link>https://medium.com/@sbkapelner?source=rss-fe7257e2b5e8------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 22 Nov 2026 18:06:07 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@sbkapelner/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Recovery System For CapCut]]></title>
            <link>https://medium.com/@sbkapelner/recovery-system-for-capcut-a1626327c431?source=rss-fe7257e2b5e8------2</link>
            <guid isPermaLink="false">https://medium.com/p/a1626327c431</guid>
            <category><![CDATA[video-editing]]></category>
            <category><![CDATA[social-media]]></category>
            <category><![CDATA[capcut-video-editor]]></category>
            <category><![CDATA[capcut]]></category>
            <category><![CDATA[tik-tok]]></category>
            <dc:creator><![CDATA[Sarah Kapelner]]></dc:creator>
            <pubDate>Fri, 27 Sep 2024 14:01:08 GMT</pubDate>
            <atom:updated>2024-12-28T15:11:45.628Z</atom:updated>
            <content:encoded><![CDATA[<h4>Revert to previous versions of your CapCut projects</h4><p>Sometimes the autosave feature of CapCut does more harm than good. I have had experiences where I was working on a project and accidentally changed, deleted or moved some content and could not undo the changes because the autosave feature had saved the changes by the time I noticed them. Below I discuss how to use Git to revert back to previous versions of my CapCut projects. I also include a link to an application I created for those who don’t want to use the terminal/command line. If you would like to skip to the user interface section scroll to the bottom of the article.</p><h3>What is Git?</h3><p>Git is a tool that helps you keep track of changes to your files, much like Apple’s Time Machine for your Mac or AutoRecover for Microsoft Word. Whether you’re a writer, designer, influencer or someone who just wants a safety net for their work, Git can be a lifesaver.</p><p>With Git, you can:</p><ul><li><strong>Back up your work</strong> as you go.</li><li><strong>Revisit earlier versions</strong> of your documents.</li><li><strong>Undo mistakes</strong> if you make unwanted changes.</li></ul><p>Let’s break down how you can install and use Git for basic backup and version control on Mac, Windows, and Linux.</p><h3>Installing Git</h3><h4>Mac OS</h4><ol><li>Check if Git is already installed by opening Terminal (found in Applications &gt; Utilities) and typing:</li></ol><pre>git --version</pre><p>2. If Git is not installed, you will be prompted to install the <strong>Xcode Command Line Tools</strong>. Simply follow the prompts. Alternatively you can install Git on Mac by following one of the other methods here: <a href="https://git-scm.com/downloads/mac">https://git-scm.com/downloads/mac</a></p><h4>Windows</h4><ol><li>Download the <strong>Git for Windows installer</strong> from the official site: <a href="https://git-scm.com/">https://git-scm.com</a>.</li><li>Run the installer, and accept the default settings unless you know what you are doing.</li><li>After installation, open <strong>Git Bash</strong> (found in your Start menu) to start using Git.</li></ol><h3>Basic Git Commands for Backup and Version Control</h3><p>Now that Git is installed, let’s walk through how you can use it to back up your files and manage versions.</p><h4>1. Initialize a Git Repository</h4><p>Before you start tracking changes, you need to initialize Git in the folder where your project or documents are located. CapCut saves drafts in /Users/YOURUSERNAME/Movies/CapCut/UserData/Projects/Com.lveditordraft (Mac) and C:\Users\YOURUSERNAME\AppData\Local\CapCut\UserData\Projects\com.lveditordraft (Win) by default. Open Terminal (Mac) or Git Bash (Windows) and navigate to your project folder as follows:</p><pre>cd &#39;/Users/YOUR USER NAME/Movies/CapCut/User Data/Projects/PROJECT NUMBER&#39;<br>git init<br>git add .<br>git commit -m &quot;initial commit&quot;</pre><p>This creates a hidden .git folder in your project directory, where Git will store all of its tracking information. You only need to do this once per project.</p><h4>2. Commit Files (create backups)</h4><p>Once you have a git repository initialized, you can begin working on your CapCut project. Generally, we make commits (create back ups) by typing the following:</p><pre>git add .<br>git commit -m &quot;A SHORT MESSAGE DESCRIBING THE CURRENT STATE OF THE PROJECT&quot;</pre><p>For example, if I am working on a CapCut project and I add add a black and white filter to my title card, I would type git commit -m &quot;Added black and white to title card.&quot; The commit message can be whatever you want just make sure to surround it in quotes. Each time you commit, Git stores a version of your files, allowing you to go back and forth between versions later.</p><p>However, as you navigate between different versions (commits) using git checkout, you may get into a <strong>detached head</strong> state, which means Git won’t let you create new commits easily. The example in Section 4 below showing (HEAD) and (main) on different lines is in a detached head state. To avoid confusion, always return to the main branch before making new changes. To do so run the following 5 commands every time you want to make a commit:</p><pre>git stash<br>git checkout main<br>git stash pop <br>git add . <br>git commit -m &quot;YOUR COMMIT MESSAGE&quot;</pre><h4>3. <strong>View Your Commit History</strong></h4><p>To view all the backups of your CapCut project you can type:</p><pre>git log --all --oneline</pre><p>This will show you a list of all your commits like so:</p><pre>2ff3c64 (HEAD, main) nightclub effect<br>ae3bea7 back to no bw<br>ddc6e30 black and white title card2<br>ebf9dfc black and white title card<br>f6a52e9 initial commit</pre><p>The commits are listed in order from most recent to least recent. Looking at the first commit by way of example, the commit ID is 2ff3c64, and the commit message is nightclub effect. I created this commit after I added a nightclub effect to a frame of my CapCut project. The commit ID is created by Git automatically.</p><h4>4. Navigating Between Commits</h4><p>Because of the autosave feature of CapCut it is important to be on the CapCut home screen at the time you are navigating between commits or the autosave feature may interfere. So <strong>always navigate to CapCut &gt; Back to home page prior to navigating between commits</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pG5Gm-ChbqryjH52yl_J6g.png" /><figcaption>I want to be on the home page screen whenever I checkout a commit.</figcaption></figure><p>To navigate to a particular commit (revert to a previous version of your project) type git + checkout + commit ID as follows:</p><pre>git checkout -f ae3bea7</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*A0S7s9n1RBJZuSTjYyG8MA.png" /><figcaption>2ff3c64 nightclub effect</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-gYAqcpnFR8uSaa77eNzqA.png" /><figcaption>ae3bea7 back to no bw</figcaption></figure><p>In the above example I revert back to ae3bea7 back to no bw from 2ff3c64 nightclub effect. In other words I navigated between one version of my project having a nightclub effect to a previous version of my project not having the nightclub effect. Keep in mind that if you make changes to your CapCut project and then navigate to another commit before committing them those changes will be lost. There are more advanced features of Git that can prevent those changes from being lost but they will not be discussed in this article for simplicity.</p><p>To determine which version/commit you currently have checkout out run git log --all --oneline:</p><pre>git log --all --oneline<br><br>2ff3c64 (main) nightclub effect<br>ae3bea7 (HEAD) back to no bw<br>ddc6e30 black and white title card2<br>ebf9dfc black and white title card<br>f6a52e9 initial commit</pre><p>You can tell I currently have the ae3bea7 commit checked out because it has (HEAD) next to it.</p><h4>5. Undoing Changes (Reset)</h4><p>If you’ve made changes to your CapCut project but decide you want to discard them all go back to the latest committed version, you can run:</p><pre>git reset --hard</pre><p>This is particularly useful in the event you inadvertently made a change to your project and cannot simply use the undo button to get rid of the change.</p><h3>Summary of Git Commands</h3><ul><li><strong>Initialize a repository (once per project)</strong>: git init</li><li><strong>Making commits</strong>: git stash</li><li>git checkout main</li><li>git stash pop</li><li>git add .</li><li>git commit -m &quot;YOUR MESSAGE&quot;</li><li><strong>View commit history</strong>: git log --all --oneline</li><li><strong>Move to a specific version</strong>: git checkout [COMMIT ID]</li><li><strong>Undo changes back to the last commit</strong>: git reset --hard</li></ul><h3>Video Project Rewind</h3><p>If you prefer not to use the terminal/command line I have created an application that allows you to accomplish all the tasks described above via a user interface. You should still <strong>make sure you are on the CapCut home page when making commits</strong> through this application.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NRn6PQhJSaYr2-nIm0KoIw.png" /><figcaption>Backup your CapCut project using this application instead of the command line</figcaption></figure><p>The application is available for both Mac and Windows here: <a href="https://github.com/sbkapelner/Video-Project-Rewind">https://github.com/sbkapelner/Video-Project-Rewind</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a1626327c431" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Create Fully Customizable Language Learning Lessons with Fabric and Obsidian]]></title>
            <link>https://medium.com/@sbkapelner/create-fully-customizable-language-learning-lessons-with-fabric-and-obsidian-594ef472fa2f?source=rss-fe7257e2b5e8------2</link>
            <guid isPermaLink="false">https://medium.com/p/594ef472fa2f</guid>
            <category><![CDATA[tech]]></category>
            <category><![CDATA[obsidian]]></category>
            <category><![CDATA[language-learning]]></category>
            <category><![CDATA[ai]]></category>
            <dc:creator><![CDATA[Sarah Kapelner]]></dc:creator>
            <pubDate>Mon, 02 Sep 2024 00:17:00 GMT</pubDate>
            <atom:updated>2024-09-02T13:15:24.280Z</atom:updated>
            <content:encoded><![CDATA[<h4>With useful examples</h4><h3>Fabric</h3><p>If you already know how to use Fabric and Obsidian you can skip to the Examples section.</p><h4>What is Fabric?</h4><p>I would describe Fabric as an open-source framework for interacting with LLMs. It was created by Daniel Miessler. Fabric consists of a cli tool written in Go (previously Python). The Fabric cli tool takes markdown files called patterns as input. Patterns are essentially LLM prompts. Fabric comes packaged with more than 100 ready-to-use, open-source, crowdsourced patterns.</p><h4>Supported AI Vendors</h4><p>As of September 2024 Fabric supports integration with models from OpenAI, Anthropic, Groq, Gemini, Azure, local via Ollama.</p><h4>Cost</h4><p>I used gpt4o-mini to create the below examples. I estimate the cost per example to be less than one-tenth of a cent.</p><h4>Installing Fabric</h4><p>To install Fabric follow the instructions on the <a href="https://github.com/danielmiessler/fabric">Github repo</a>. I have reproduced the installation instructions below:</p><pre># Run the below command to download the files from the repo and install Fabric.<br>go install github.com/danielmiessler/fabric@latest<br><br># Update your Go environment variables in your ~/.zsh, ~/.bashrc, or other shell configuration file.<br>export GOROOT=/usr/local/go<br>export GOPATH=$HOME/go<br>export PATH=$GOPATH/bin:$GOROOT/bin:$HOME/.local/bin:$PATH:<br><br># Run the setup tool.<br>fabric --setup<br><br># The above setup tool will create environment variables for your API keys, default model and default AI vendor. If you need to modify any values provided you may do so by modifying this file:<br>nano ~/.config/fabric/.env<br>OPENAI_API_KEY=[YOUR API KEY]<br><br># Alternatively, you can specify the environment variables for your API keys etc. <br># in your ~/.zsh, ~/.bashrc, or other shell configuration file.<br># These will override the environment variables you may have specified in ~/.config/fabric/.env<br>nano ~/.zshrc<br>export OPENAI_API_KEY=&quot;[YOUR API KEY]&quot; # quotes around the API Key string</pre><p>Daniel Miessler also created another cli tool (yt) capable of extracting YouTube transcripts to seamlessly use them with Fabric. You should install this tool as follows:</p><pre># Run the below command to install yt.<br>go install github.com/danielmiessler/yt@latest<br><br># Add your YouTube API Key environment variable to ~/.config/fabric/.env.<br>nano ~/.config/fabric/.env<br>YOUTUBE_API_KEY=[YOUR YOUTUBE API KEY] # no quotes around the API Key string</pre><h4>Using Patterns</h4><p>Below is an example of basic pattern usage. I have a pattern called lesson. In front of the fabric command I pipe (input) into the fabric command some text that I want fabric to operate on via the pattern. In this case that text is a sort of starter prompt to direct fabric how to use the lesson pattern. I then save the output from Fabric to the file ~/Documents/spanish_/new_lesson.md:</p><pre>echo &quot;Make me a lesson on usage of estaba vs. estuve in Spanish&quot; | fabric -p lesson &gt; ~/Documents/spanish_/new_lesson.md </pre><p>Alternatively I can forgo writing the Fabric output to a file and simply send it to the standard output:</p><pre>echo &quot;Make me a lesson on usage of estaba vs. estuve in Spanish&quot; | fabric -p lesson</pre><p>Fabric also comes with a -o flag that I can specify to send the Fabric output to the standard output and subsequently save it to a file:</p><pre>echo &quot;Make me a lesson on usage of estaba vs. estuve in Spanish&quot; | fabric -p lesson -o [PATH TO DESIRED OUTPUT DIRECTORY]/[OUTPUT FILENAME]</pre><p>You can also stitch patterns together by piping output from one Fabric command into another. This allows you to further tailor your output. In the below example I stitch together the lesson pattern and the create_quiz pattern:</p><pre>echo &quot;Make me a lesson on usage of estaba vs. estuve in Spanish&quot; | fabric -p lesson | fabric -p create_quiz -o [PATH TO DESIRED OUTPUT DIRECTORY]/[OUTPUT FILENAME]</pre><p>I can use the above command to have Fabric use the lesson pattern to create a lesson on estaba and estuve in Spanish and then subsequently have Fabric take that lesson and create me a quiz based on the lesson with the create_quiz pattern.</p><p>Similarly, you can pipe YouTube transcripts from the yt tool into Fabric in order to create content based on YouTube videos. For example, you can use the yt tool and fabric to summarize the content of a YouTube video:</p><pre>yt &#39;https://www.youtube.com/watch?v=UbDyjIIGaxQ&#39; | fabric -p summarize &gt; &#39;What is Fabric?.md&#39;</pre><h4>Creating and Using Custom Patterns</h4><p>You can create custom patterns by following the steps below:</p><ol><li>Create a directory with the name of the pattern at this location: ~/.config/fabric/patterns e.g. ~/.config/fabric/patterns/[YOUR PATTERN NAME}</li><li>Create a system.md file within the directory you created in step 1.</li><li>Type your prompt in the system.md file. I usually copy a system.md file from the directory of a pre-exisiting pattern and modify the prompt to suit the use case of my custom pattern.</li><li>Save the system.md file and run the same sorts of commands discussed in the previous section. The commands are reproduced below for convenience:</li></ol><pre># Use your custom pattern and send the output to standard output<br>fabric -p [NAME OF CUSTOM PATTERN]<br><br># Use your custom pattern and send the output to standard output and subsequently to a file e.g. a markdown file that sits in an Obsidian vault<br>fabric -p [NAME OF CUSTOM PATTERN] -o [PATH TO DESIRED OUTPUT DIRECTORY]/[OUTPUT FILENAME]<br><br># Use your custom pattern and save the output to a file<br>fabric -p [NAME OF CUSTOM PATTERN] &gt; [PATH TO DESIRED OUTPUT DIRECTORY]/[OUTPUT FILENAME]</pre><p>As of September 2024 custom patterns do not work with Claude (Anthropic).</p><h3>Obsidian</h3><h4>What is Obsidian?</h4><p>Obsidian is a note-taking app that store notes as markdown files. Obsidian notes are stored in directories called vaults. One advantage of Obsidian is that it allows organization of notes via tags and links. Tags can be used to group notes into categories, whereas links can be used to create connections between notes. Another advantage of Obsidian is that it has a host of core and community created plugins that make the app highly customizable. I installed a few community plugins that turned the app into a great environment for language learning. There is a great resource to learn the basics of Obsidian <a href="https://elizabethbutlermd.com/obsidian-notes/">here</a>. However, you can easily learn the basics of Obsidian by opening the app up and trying it out.</p><h4>Installing Obsidian</h4><p>Obsidian can be downloaded <a href="https://obsidian.md/download">here</a>.</p><h4>Using Obsidian with Fabric</h4><p>I can save Fabric output to a new note in an Obsidian vault of my choice with the following command:</p><pre># Save Fabric output to Obsidian<br>fabric -p [NAME OF PATTERN I WANT TO USE] &gt; [PATH TO OBSIDIAN VAULT]/[OUTPUT FILENAME]</pre><p>As I mentioned above, Obsidian’s features like tags, links and plugins make it a great tool for language learning. I transformed Obsidian into a language learning application with the Translate community plugin by Fevol:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tx7d9kk_K2pTsSWMhNkUaw.png" /><figcaption>Obsidian interface with Translate plugin by Fevol using DeepL as a translation service</figcaption></figure><p>In the above screenshot you can see the Translate plugin in the tab on the righthand side. The Translate plugin is using DeepL as the translation service, however, this plugin is compatible with other translation services e.g. Google. With this plugin I can translate text within my Obsidian note without navigating away from the Obsidian app.</p><h3>Examples</h3><p>Below are I provide two patterns I created to <strong>make myself different kinds of Spanish lessons</strong>.</p><h4>Example 1 — Learn Vocabulary and Phrases with YouTube</h4><p>This pattern produces a Spanish lesson based on a YouTube video. The YouTube video is a collection of scary stories in Spanish. The pattern creates a markdown files with three sections: Transcript, Preguntas, Respuestas. The Transcript section includes the YouTube video transcript with inline parenthetical translations of various words and phrases that an upper intermediate student of Spanish may not know. The Preguntas section includes 25 fill in the blank questions on the translated words and phrases. The Respuestas section includes the answers to the 25 fill in the blank questions. You can download the lesson I made by using this pattern here: <a href="https://www.dropbox.com/scl/fi/nb4w4uobubw0cb7v737et/La-Casa-Embrujada.md?rlkey=f8xwo6mwrbd6khs67mjj7phs3&amp;st=cdasho8i&amp;dl=0">Example 1 — La Casa Embrujada.md</a></p><p>If you would like to create a similar lesson use the pattern below:</p><pre># IDENTITY and PURPOSE<br><br>- You are a native spanish speaker from Mexico with decades of<br>  experience<br>  under your belt.<br>- You are proficient in both Spanish and English.<br><br># STEPS<br><br>- Create a title for the note based on the transcript you are<br>  provided.<br>- Below the title for the note put the url to the youtueb video for which you received the transcript for<br>- put the username of the person who uploaded the youtube video below the url<br>- In a Transcript section reproduce the youtube transcript you<br>  receive verbatim. But break it up into paragraphs as seems natural to you.<br>- The transcript will likely be in Spanish. You have to translate words and phrases parenthetically within the<br>  transcript for any words or phrases you think a B1 level spanish learner does not know.<br>- Parenthetically translate a generous number of words and<br>  phrases. No less than 25 words or phrases will be translated but DO NOT limit yourself to only translating 25 words. Also be sure not to translate every single word or phrase in the transcript. You should only be translating words or phrases that an upper intermediate spanish learned probably does not yet know. For example an upper intermediate spanish student probably knows the spanish word for common foods, greetings, colors, the 10 most common verbs, weather, days of the week/date and time. The upper intermediate spanish student probably does not know less common adjectives, verbs and nouns or colloquial phrases such as &quot;sin dar más vueltas&quot;.<br>- The phrases you parenthetically translate should be useful<br>  phrases. Not Duolingo-like useless phrases.<br>- In a Preguntas section include fill in the blank exercises<br>  for each word or phrase you translated. You will provide the<br>  English and the blank will be to receive the Spanish.<br>- When selecting the words and phrases to include in the Preguntas section skip words or phrases from the first 300 and last 300 lines of the transcript because they are likely video intros and outros.<br>- In addition when creating the fill in the blank excercises be sure to make any conjugated words or phrases into the the unconjugated form. For example, if you are going to include a colloquial phrase like &quot;I realized&quot; in the Preguntas section change it to &quot;to realize&quot;. Or if you are going to include a verb like &quot;to unfold&quot; but it appears in the transcript as &quot;it unfolds&quot; be sure to chage it to &quot;to unfold&quot; in the Preguntas section.<br>- Only use &lt;input type=&quot;text&quot; id=&quot;name&quot; name=&quot;name&quot;/&gt; for the<br>  blanks for the fill in the blank exercises.<br>- After the Preguntas section include in a Respuestas section<br>  an answer key with the answers to the fill in the blank<br>  exercises.<br><br># OUTPUT INSTRUCTIONS<br><br>- Only output Markdown.<br>- Do not give warnings or notes; only output the requested<br>  sections.<br>- You use a numbered list for the fill in the blank exercises.<br>- Do not output repetitions.<br>- Ensure you follow ALL these instructions when creating your<br>  output.<br>- Ensure the text in the Preguntas section is in English not Spanish<br>- Ensure the text in the Respuestas section is in Spanish not English<br>- add an obsidian tag with the title<br>- add an obsidian tag called listening<br>- add an obsidian link to an obsidian markdown file<br>  called Spanish Roadmap.md<br>- Do not put Tags:, tags:, obsidian tags: or the like. Just<br>  put the tags I mention above without text denoting them.<br>- Only use &lt;input type=&quot;text&quot; id=&quot;name&quot; name=&quot;name&quot;/&gt; for the<br>  blanks for the fill in the blank exercises.<br>- Replace all underscores in the Preguntas section with &lt;input type=&quot;text&quot; id=&quot;name&quot; name=&quot;name&quot;/&gt;<br><br># INPUT<br><br>INPUT:</pre><p>To use this pattern I created a pattern called listening and ran the following command:</p><pre>yt &#39;https://www.youtube.com/watch?v=UbDyjIIGaxQ&#39; | fabric -p listening &gt; &#39;La Casa Embrujada.md&#39;    </pre><h4>Example 2 — Grammar Lesson with Practice Questions</h4><p>This pattern creates a Spanish grammar lesson. The lesson includes a Lesson section, a Práctica and an Answers section, The Lesson section includes an explanation of the grammar topic. The Práctica section includes 15 fill in the blank exercises on the grammer topic. The Answers section includes an answer key to the fill in the blank exercises in the Práctica section. You can download the lesson I made by using this pattern here: Example 2 - <a href="https://www.dropbox.com/scl/fi/uuqvqpgyw57zrqn1r1jj4/Estuve-vs-Estaba.md?rlkey=rwxbhdox8pjmrumn7fy17pqw6&amp;st=6a9bujxr&amp;dl=0">Estaba vs Estuve.md</a></p><pre># IDENTITY and PURPOSE<br><br>- You are a native spanish speaker from Mexico with decades of experience<br>  under your belt.<br>- You are proficient in both Spanish and English.<br>- Your role is to help students learn Spanish through clear explanations,<br>  relevant examples, and interactive practice.<br>- You provide grammatical rules, vocabulary, pronunciation guidance, and<br>  cultural insights  <br>   when necessary.<br>- You point out vocabulary and grammar differences between your native<br>  Mexico and Spain when necessary.<br>- You always encourage students and offer constructive feedback to improve<br>  their language skills.<br><br># STEPS<br><br>- Give the lesson a title based on the Spanish grammar concept requested by the user.<br>- In a Lesson section explain the Spanish grammar concept in no less than 150 words and provide example sentences.<br>- Include at least 5 example sentences.<br>- Provide english and spanish translations of any example sentences you<br>  provide.<br>- After the Lesson section include a Practice section with 15 fill in the blank exercises as a numbered list.<br>- The 15 fill in the blank exercises will be a spanish sentence with one<br>  or more blanks. The student will have to fill in the missing spanish word<br>  or words.<br>  Only use &lt;input type=&quot;text&quot; id=&quot;name&quot; name=&quot;name&quot;/&gt; for the blanks for the fill in the blank exercises.<br>- After the Lesson section include in an Answers section an answer key<br>  with the answers to the fill in the blank exercises. Provide both the<br>  english and spanish translations of the fill in the blank exercises.<br><br># OUTPUT INSTRUCTIONS<br><br>- Only output Markdown.<br>- The Lesson section should always have a paragraph explaining the grammar concept preceding the example sentences.<br>- Do not give warnings or notes; only output the requested sections.<br>- You use a numbered list for the 15 fill in the blank exercises.<br>- Do not output repetitions.<br>- Ensure you follow ALL these instructions when creating your output.<br>- add an obsidian tag with the lesson title<br>- add an obsidian tag called grammar<br>- add an obsidian link to an obsidian markdown file<br>  called Spanish Roadmap.md<br>- Do not put Tags:, tags:, obsidian tags: or the like. Just put the tags I mention above without text denoting them.<br>- Only use &lt;input type=&quot;text&quot; id=&quot;name&quot; name=&quot;name&quot;/&gt; for the blanks for the fill in the blank exercises.<br><br># INPUT<br><br>INPUT:</pre><p>To use this pattern I created a pattern called lesson and ran the following command:</p><pre>echo &quot;Make me a lesson on usage of estaba vs. estuve in Spanish&quot; | fabric -p lesson | &#39;~/Documents/spanish_/Estuve vs Estaba.md&#39;</pre><p>Note in the above example patterns I specify in the prompt for fabric to use html form elements for the blank in the fill in the blank exercises. This is simply because I like the way it makes my fill in the blank exercises look.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*uhzlC2ajlluRbEM58lJeWg.png" /><figcaption>HTML form elements are used to create nice looking fill in the blank exercises</figcaption></figure><p>Also note I instruct Obsidian to add some tags and links in the # OUTPUT INSTRUCTIONS section of the above example patterns. This allows me to categorize and link my notes automatically when they are created.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*L8lFutsd1nbUbfy5Xp6FEg.png" /><figcaption>Spanish grammar lesson including tags #estuve-vs-estaba and #grammar and a link to another Obsidian note Spanish Roadmap.md</figcaption></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=594ef472fa2f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Building and Pushing to Artifact Registry with Github Actions]]></title>
            <link>https://medium.com/@sbkapelner/building-and-pushing-to-artifact-registry-with-github-actions-7027b3e443c1?source=rss-fe7257e2b5e8------2</link>
            <guid isPermaLink="false">https://medium.com/p/7027b3e443c1</guid>
            <category><![CDATA[github-actions]]></category>
            <category><![CDATA[google-cloud-platform]]></category>
            <dc:creator><![CDATA[Sarah Kapelner]]></dc:creator>
            <pubDate>Wed, 20 Sep 2023 02:15:23 GMT</pubDate>
            <atom:updated>2023-09-23T21:41:51.112Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PUmYnnDA5nfb-qL66JxD6w.jpeg" /><figcaption>Photo by <a href="https://unsplash.com/@richygreat?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Richy Great</a> on <a href="https://unsplash.com/photos/MAYEkmn7G6E?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a></figcaption></figure><p>Github Actions is a continuous integration and continuous delivery (CI/CD) tool that triggers actions based on events in a Github repository e.g. a pull request. This article illustrates how to create a Github Actions workflow that builds a Docker image and pushes that image to Google Cloud Artifact Registry. In this article we will authenticate with a <strong>Service Account Key</strong>.</p><h3>Creating and Configuring a Service Account</h3><p>First ensure that you are authenticated through the gcloud account and project you intend to use.</p><pre>#Authorize gcloud to use your Google Cloud credentials<br>gcloud auth login<br>gcloud auth list<br>gcloud project list<br><br>#Switch to a different account and/or project<br>gcloud config set account $ACCOUNT<br>gcloud config set project $MY_PROJECT_ID</pre><p>In order to work with Google Cloud through Github Actions we will create a service account. A service account allows Github Actions to access Google Cloud Resources i.e. make calls to GCP APIs. A service account can be created with the following gcloud command:</p><pre>gcloud iam service-accounts create githubactions \                                                              <br>    --description=&quot;service acct for github actions&quot; \                     <br>    --display-name=&quot;Github Actions&quot;</pre><p>The next step is to grant the service account an IAM role:</p><pre>gcloud iam service-accounts add-iam-policy-binding PROJECT_NUMBER-compute@developer.gserviceaccount.com \<br>    --member=&quot;serviceAccount:githubactions@PROJECT_ID.iam.gserviceaccount.com&quot; \<br>    --role=&quot;roles/iam.serviceAccountUser&quot;</pre><p>Next we need to grant some permissions to the service account which Github Actions can take advantage of by impersonating the service account. The Service Account Token Creator role allows the service account to create an OAuth 2.0 access token. Github Actions uses the access token to authenticate requests to GCP APIs. The Artifact Registry Writer role allows Github Actions to read and write artifacts i.e. pull/push images to and from Artifact Registry.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CUGu1jEFUa0yvKsLt14k0w.png" /></figure><p>After granting permissions we need to add a Service Account Key. In the Google Cloud Console go to IAM &gt; Service Accounts. Click on the three dots menu next to the service account you just created and click on Manage Keys. Add a JSON key.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-vVTLzsjsF5HLywkjz0oQg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pb1FtoK4MjQCwmp5FtaukQ.png" /></figure><p>Add the JSON key that you just downloaded to a Github Secret. In this example I named my Github Secret SERVICE_ACCOUNT_KEY.</p><h3>Writing the Workflow</h3><p>Github Actions workflows are defined as yaml files. Included in a workflow is one or more jobs or sets of steps (shell commands) we want the action to perform in response to an event in the repository. Each job runs in its own virtual machine (runner) and can be configured to run with other jobs sequentially or in parallel, however, in this article we will write a workflow with a single job.</p><p>In the following section of my workflow I give the workflow a name and specify the events I want to trigger the action. Then I specify some environmental variables including my project ID, project region and the location of my Artifact Registry repository.</p><pre>name: Build and Push to Artifact Registry<br><br>on:<br>  push:<br>    branches: [&quot;main&quot;]<br>  pull_request:<br>    branches: [&quot;main&quot;]<br><br>env:<br>  PROJECT_ID: fake-app-323017<br>  REGION: northamerica-northeast1<br>  GAR_LOCATION: northamerica-northeast1-docker.pkg.dev/fake-app-323017/repo-1/</pre><p>Next I specify the type of environment the runner will run the job on (ubuntu-latest) and checkout my Github repository with actions/checkout@v3. Note the “Checkout” step <strong>must be placed prior to the “auth” step</strong> (discussed in the next section) in order to avoid authentication problems.</p><pre>job:<br>  build-push-artifact:<br>    runs-on: ubuntu-latest<br>    steps:<br>      - name: &quot;Checkout&quot;<br>        uses: &quot;actions/checkout@v3&quot;</pre><p>This next section of the workflow includes three steps. In the “auth” step a credential file is created with my SERVICE_ACCOUNT_KEY and then that file is used in the “Set up Cloud SDK” step to authenticate my Google Cloud account. I then use gcloud info to optionally display information about my current gcloud environment.</p><pre>      - id: &quot;auth&quot;<br>        uses: &quot;google-github-actions/auth@v1&quot;<br>        with:<br>          credentials_json: &quot;${{ secrets.SERVICE_ACCOUNT_KEY }}&quot;<br><br>      - name: &quot;Set up Cloud SDK&quot;<br>        uses: &quot;google-github-actions/setup-gcloud@v1&quot;<br><br>      - name: &quot;Use gcloud CLI&quot;<br>        run: &quot;gcloud info&quot;</pre><p>In the next section of the workflow I authenticate Docker to access the Artifact Registry by running the gcloud auth configure-docker command. I added the — quiet flag to swap any interactive prompts in favor of defaults.</p><pre>      - name: &quot;Docker auth&quot;<br>        run: |-<br>          gcloud auth configure-docker ${{ env.REGION }}-docker.pkg.dev --quiet</pre><p>At this point all we have left to add to the workflow are the steps to build and push the image. Replace WORKING_DIRECTORY with the top level directory of your Github repository and replace DOCKERFILE_LOCATION with the location of your Dockerfile relative to the top level directory. Tag your image using the location of your Artifact Registry Repository and push the image to that same location (GAR_LOCATION environmental variable in this example).</p><pre>      - name: Build image<br>        run: docker build . --file DOCKERFILE_LOCATION --tag ${{ env.GAR_LOCATION }}<br>        working-directory: WORKING_DIRECTORY<br><br>      - name: Push image<br>        run: docker push ${{ env.GAR_LOCATION }}</pre><p>The last step is to commit your workflow and push it to your Github repository. Below is the complete workflow.yml file:</p><pre>name: Build and Push to Artifact Registry<br><br>on:<br>  push:<br>    branches: [&quot;main&quot;]<br>  pull_request:<br>    branches: [&quot;main&quot;]<br><br>env:<br>  PROJECT_ID: fake-app-323017<br>  REGION: northamerica-northeast1<br>  GAR_LOCATION: northamerica-northeast1-docker.pkg.dev/fake-app-323017/repo-1/<br><br>job:<br>  build-push-artifact:<br>    runs-on: ubuntu-latest<br>    steps:<br>      - name: &quot;Checkout&quot;<br>        uses: &quot;actions/checkout@v3&quot;<br><br>      - id: &quot;auth&quot;<br>          uses: &quot;google-github-actions/auth@v1&quot;<br>          with:<br>            credentials_json: &quot;${{ secrets.SERVICE_ACCOUNT_KEY }}&quot;<br><br>      - name: &quot;Set up Cloud SDK&quot;<br>        uses: &quot;google-github-actions/setup-gcloud@v1&quot;<br><br>      - name: &quot;Use gcloud CLI&quot;<br>        run: &quot;gcloud info&quot;<br><br>      - name: &quot;Docker auth&quot;<br>        run: |-<br>          gcloud auth configure-docker ${{ env.REGION }}-docker.pkg.dev --quiet<br><br>      - name: Build image<br>        run: docker build . --file DOCKERFILE_LOCATION --tag ${{ env.GAR_LOCATION }}<br>        working-directory: WORKING_DIRECTORY<br><br>      - name: Push image<br>        run: docker push ${{ env.GAR_LOCATION }}</pre><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7027b3e443c1" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Hide Desktop Icons macOS]]></title>
            <link>https://medium.com/@sbkapelner/hide-desktop-icons-macos-a6746e1833c7?source=rss-fe7257e2b5e8------2</link>
            <guid isPermaLink="false">https://medium.com/p/a6746e1833c7</guid>
            <dc:creator><![CDATA[Sarah Kapelner]]></dc:creator>
            <pubDate>Mon, 11 Apr 2022 03:35:42 GMT</pubDate>
            <atom:updated>2022-04-11T13:30:49.879Z</atom:updated>
            <content:encoded><![CDATA[<h4>No third party apps needed</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*x6FcFXW9OuPvrVu4vVMekg.png" /></figure><p>This article outlines an easy way to hide desktop icons on macOS (a feature that has eluded me for more than 10 years). First I will discuss the commands needed to hide and show desktop icons. Then I will discuss how to create aliases in order to easily toggle desktop icons on and off.</p><h3>Getting Started</h3><p>Open the terminal if you haven’t already by going to Applications &gt; Utilities &gt; Terminal. Note I am using a zsh shell but the same procedure works in a bash shell.</p><h3>The Commands</h3><p>Two terminal commands are needed to hide/show desktop icons on macOS.</p><h3>Hiding Icons</h3><h3>1. Hide Icons</h3><p>The first command tells the Finder not to generate desktop icons:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ULjZ4spBXWh7cWoX15uMng.png" /><figcaption>defaults write com.apple.finder CreateDesktop false</figcaption></figure><h3>2. Kill and Restart Finder</h3><p>The second command kills the current Finder process. Once this command is executed the Finder will automatically restart.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/872/1*mJg8yzPuxnBZIqJwLpbvqQ.png" /><figcaption>killall Finder</figcaption></figure><h3>Showing Icons</h3><h3>1. Show Icons</h3><p>To toggle icons back on run the following command which tells the Finder to generate desktop icons:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0H8mHx9IN3dAX9WTtWqL6A.png" /><figcaption>defaults write com.apple.finder CreateDesktop true</figcaption></figure><h3>2. Once Again Kill and Restart Finder</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/872/1*mJg8yzPuxnBZIqJwLpbvqQ.png" /><figcaption>killall Finder</figcaption></figure><h3>Creating Aliases</h3><p>Aliases or command shortcuts are one of the many luxuries of Unix shells. Next I will discuss how to create aliases to easily allow you to toggle desktop icons on and off.</p><h3>1. Check for Configuration File</h3><p>If you are using a zsh shell verify that the zsh user level configuration file exists. This file is called zshrc and should remain in your home directory. This file holds scripts that are run every time a new terminal user session is launched. If ~/.zshrc does not exist create it by typing “touch ~/.zshrc” in the terminal.</p><p>If you are using a bash shell the file you will be working with is ~/.bashrc and can be created and edited in the same manner as ~/.zshrc.</p><h3>2. Edit Configuration File</h3><p>In your preferred text editor (I am using nano) add aliases for hiding and showing icons as follows. It is important not to have spaces between the alias name and the equal sign and between the equal sign and the first set of quotation marks.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mbZEXFpfk94kQT-ZhQIbuA.png" /></figure><p>Note that I decided to call my aliases “hideicons” and “showicons” but you can change the names as you see fit.</p><h3>3. Restart Terminal</h3><p>Close out of the current terminal session and open a new one. You should now be able to toggle your desktop icons on and off by entering the aliases you created into the terminal.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/786/1*2RIWyt-pEbhRHn8_X_GTBg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/792/1*TZx5E7SefJdqG0zeQuuD8g.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a6746e1833c7" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>