Compare commits
No commits in common. "c35432b9bb1d576a9dcaf77c518d67328d461821" and "2e4bdf8317c39a0a0817582baf95597ab79478e7" have entirely different histories.
c35432b9bb
...
2e4bdf8317
|
@ -180,13 +180,12 @@
|
|||
"omnisearch:Omnisearch": false
|
||||
}
|
||||
},
|
||||
"active": "630c2dee08cf5f73",
|
||||
"active": "74d85386e2039ea7",
|
||||
"lastOpenFiles": [
|
||||
"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/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/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)/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",
|
||||
|
@ -212,6 +211,7 @@
|
|||
"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",
|
||||
|
|
|
@ -307,51 +307,9 @@ fi
|
|||
sleep 10 # for testing
|
||||
git push -q
|
||||
```
|
||||
|
||||
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.
|
||||
|
||||
4. Now it is time to submit this to the `launchd` scheduler. Navigate to
|
||||
5.
|
||||
|
||||
6.
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -10,27 +10,4 @@ Aliases in your terminal make shortcuts a lot easier when you're typing, use the
|
|||
|
||||
then in the terminal type
|
||||
|
||||
``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
|
||||
|
||||
```
|
||||
|
||||
|
||||
``bbedit FILE_NAME``
|
|
@ -74,6 +74,4 @@
|
|||
</dict>
|
||||
</plist>
|
||||
|
||||
```
|
||||
|
||||
|
||||
```
|
Loading…
Reference in New Issue