Compare commits

..

4 Commits

4 changed files with 74 additions and 7 deletions

View File

@ -180,12 +180,13 @@
"omnisearch:Omnisearch": false
}
},
"active": "74d85386e2039ea7",
"active": "630c2dee08cf5f73",
"lastOpenFiles": [
"Coding Tips (Classical)/Terminal Tips/Shells/Bash.md",
"Coding Tips (Classical)/Terminal Tips/Commands + Settings/Aliases.md",
"Coding Tips (Classical)/Project Vault/Obsidian/Obsidian-git process.md",
"Coding Tips (Classical)/Terminal Tips/Shells/Computers (operating system)/Apple Macbook/Launchd.md",
"Coding Tips (Classical)/Terminal Tips/Shells/Computers (operating system)/Apple Macbook/plist.md",
"Coding Tips (Classical)/Terminal Tips/Shells/Computers (operating system)/Apple Macbook/Launchd.md",
"Coding Tips (Classical)/Terminal Tips/Shells/Bash.md",
"Coding Tips (Classical)/Project Vault/Obsidian/imgFiles/Pasted image 20230714193655.png",
"Coding Tips (Classical)/Project Vault/Obsidian/Tips on Obsidian itself.md",
"Coding Tips (Classical)/Project Vault/Obsidian/imgFiles/Pasted image 20230714171308.png",
@ -211,7 +212,6 @@
"Coding Tips (Classical)/Terminal Tips/Commands + Settings/Internet/Hosting/On Hosts.md",
"Coding Tips (Classical)/Terminal Tips/Commands + Settings/Internet/Repos/Gitlab.md",
"Coding Tips (Classical)/Terminal Tips/Commands + Settings/Languages/Lisp.md",
"Coding Tips (Classical)/Terminal Tips/Commands + Settings/Aliases.md",
"Coding Tips (Classical)/Terminal Tips/Shells/Computers (operating system)/Apple Macbook/BBEdit/List of language modules.md",
"Coding Tips (Classical)/Terminal Tips/Shells/Computers (operating system)/Apple Macbook/BBEdit/Example CLM.md",
"Coding Tips (Classical)/Terminal Tips/Shells/Computers (operating system)/Apple Macbook/BBEdit/CLM.md",

View File

@ -307,9 +307,51 @@ fi
sleep 10 # for testing
git push -q
```
4. Now it is time to submit this to the `launchd` scheduler. Navigate to
Run the script in the `/.local/bin` directory:
```
bash zk_sync
```
and your git should be updated with that one command with the updated time and the number of lines that were changed in the git commit.
Now that we have ensured that the script itself the hard part is over. The next step is to make sure that you are syncing at a consistent time!
4. Now it is time to submit this to the `launchd` scheduler. Navigate to `~/Library/LaunchAgents` as this is where you will be dropping your .plist file.
Then create the .plist which calls the previous `zk_sync` script that we made before. Make sure that you test it that you
```shell
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN"
"http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>us.shwetha.obsidian</string>
<key>ProgramArguments</key>
<array>
<string>/Users/shwethajayaraj/bin/zk_sync.sh</string>
</array>
<key>StartInterval</key>
<integer>15</integer>
</dict>
</plist>
```
Once you have saved it as a .plist in the right directory, run:
```
launchctl load -w ~/Library/LaunchAgents/us.shwetha.obsidian.plist
```
to load this `launchd` action.
5.
6.

View File

@ -10,4 +10,27 @@ Aliases in your terminal make shortcuts a lot easier when you're typing, use the
then in the terminal type
``bbedit FILE_NAME``
``bbedit FILE_NAME``
Aliases within your `.bashrc` file is just endlessly useful. This [stackOverflow answer ](https://stackoverflow.com/questions/16199581/open-sublime-text-from-terminal-in-macos/19556342#19556342)gets a lot of it right.
---
### Shebang
This is a command that you often see at the top of the command but you never know what it does. This is used for every single type of Unix-like dydyem and is used to interpet an executable file. It is usually starting with `#!/` and leads to somewhere else.
Example:
```
#!/usr/bin/env sh
Hello World!
```
& you run the executable after `touch` creating one by:
```
chmod +x name_of_the_file
```