Skip to content

Instantly share code, notes, and snippets.

@kevin-smets
Last active June 8, 2022 08:22
Show Gist options
  • Save kevin-smets/5c997b31d3ef990fcfbc96cdd7d723f9 to your computer and use it in GitHub Desktop.
Save kevin-smets/5c997b31d3ef990fcfbc96cdd7d723f9 to your computer and use it in GitHub Desktop.

Revisions

  1. kevin-smets revised this gist Apr 28, 2017. 1 changed file with 6 additions and 0 deletions.
    6 changes: 6 additions & 0 deletions ..homeSync.md
    Original file line number Diff line number Diff line change
    @@ -13,3 +13,9 @@ cp homeSync.plist ~/Library/LaunchAgents/
    launchctl load -w ~/Library/LaunchAgents/homeSync.plist
    ```

    If you're having issues, check the logging:

    ```
    cat /tmp/homeSync.err
    cat /tmp/homeSync.out
    ```
  2. kevin-smets renamed this gist Jan 9, 2017. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  3. kevin-smets renamed this gist Jan 9, 2017. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  4. kevin-smets revised this gist Jan 9, 2017. 2 changed files with 13 additions and 15 deletions.
    11 changes: 11 additions & 0 deletions .gitignore
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,11 @@
    /*
    !.bashrc
    !.bash_history
    !.gitignore
    # Depending on your shell usage etc
    !.zshrc
    !.zsh_history
    !homeSync.plist
    !homeSync.sh

    /*/
    17 changes: 2 additions & 15 deletions homeSync.md
    Original file line number Diff line number Diff line change
    @@ -1,7 +1,9 @@
    # Feeling homeSync?

    1. Place homeSync.sh and homeSync.plist in your home dir
    1. It's recommended to place the `.gitignore` in your home dir as well, to prevent checking in **all** your things :)

    After doing that, run the following commands in `~/`.
    ```
    cd ~
    git init
    @@ -11,18 +13,3 @@ cp homeSync.plist ~/Library/LaunchAgents/
    launchctl load -w ~/Library/LaunchAgents/homeSync.plist
    ```

    Recommended to place the following `.gitignore` in `~/` as well:

    ```
    /*
    !.bashrc
    !.bash_history
    !.gitignore
    # Depending on your shell usage etc
    !.zshrc
    !.zsh_history
    !homeSync.plist
    !homeSync.sh
    /*/
    ```
  5. kevin-smets revised this gist Jan 9, 2017. No changes.
  6. kevin-smets revised this gist Nov 28, 2016. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion homeSync.sh
    Original file line number Diff line number Diff line change
    @@ -1,4 +1,4 @@
    cd
    git add .
    git commit -m "Auto sync @ $(date)"
    git commit -m "homeSynced @ $(date)"
    git push
  7. kevin-smets revised this gist Nov 25, 2016. 1 changed file with 3 additions and 4 deletions.
    7 changes: 3 additions & 4 deletions homeSync.md
    Original file line number Diff line number Diff line change
    @@ -14,14 +14,13 @@ launchctl load -w ~/Library/LaunchAgents/homeSync.plist
    Recommended to place the following `.gitignore` in `~/` as well:

    ```
    /.*
    /*
    !.bashrc
    !.bash_history
    # Add your own
    !.gitignore
    # Depending on your shell usage etc
    !.zshrc
    !.zsh_history
    /*
    !homeSync.plist
    !homeSync.sh
  8. kevin-smets revised this gist Nov 25, 2016. 1 changed file with 17 additions and 0 deletions.
    17 changes: 17 additions & 0 deletions homeSync.md
    Original file line number Diff line number Diff line change
    @@ -9,4 +9,21 @@ git remote add origin <https://your/git/repo.git>
    cp homeSync.plist ~/Library/LaunchAgents/
    launchctl load -w ~/Library/LaunchAgents/homeSync.plist
    ```

    Recommended to place the following `.gitignore` in `~/` as well:

    ```
    /.*
    !.bashrc
    !.bash_history
    # Add your own
    !.zshrc
    !.zsh_history
    /*
    !homeSync.plist
    !homeSync.sh
    /*/
    ```
  9. kevin-smets revised this gist Nov 25, 2016. No changes.
  10. kevin-smets revised this gist Nov 25, 2016. 2 changed files with 4 additions and 4 deletions.
    5 changes: 2 additions & 3 deletions homeSync.plist
    Original file line number Diff line number Diff line change
    @@ -2,14 +2,13 @@
    <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
    <plist version="1.0">
    <dict>
    <key>EnableGlobbing</key>
    <false/>
    <key>Label</key>
    <string>homeSync</string>
    <key>ProgramArguments</key>
    <array>
    <string>sh</string>
    <string>$HOME/homeSync.sh</string>
    <string>-c</string>
    <string>~/homeSync.sh</string>
    </array>
    <key>RunAtLoad</key>
    <true/>
    3 changes: 2 additions & 1 deletion homeSync.sh
    Original file line number Diff line number Diff line change
    @@ -1,3 +1,4 @@
    cd
    git add .
    git commit -m "Auto commit @ $(date)"
    git commit -m "Auto sync @ $(date)"
    git push
  11. kevin-smets revised this gist Nov 25, 2016. 1 changed file with 0 additions and 2 deletions.
    2 changes: 0 additions & 2 deletions homeSync.plist
    Original file line number Diff line number Diff line change
    @@ -19,7 +19,5 @@
    <string>/tmp/homeSync.out</string>
    <key>StartInterval</key>
    <integer>1800</integer>
    <key>WorkingDirectory</key>
    <string>~</string>
    </dict>
    </plist>
  12. kevin-smets revised this gist Nov 25, 2016. 1 changed file with 8 additions and 6 deletions.
    14 changes: 8 additions & 6 deletions homeSync.md
    Original file line number Diff line number Diff line change
    @@ -2,9 +2,11 @@

    1. Place homeSync.sh and homeSync.plist in your home dir

    cd ~
    git init
    git remote add origin <https://your/git/repo.git>

    cp homeSync.plist ~/Library/LaunchAgents/
    launchctl load -w ~/Library/LaunchAgents/homeSync.plist
    ```
    cd ~
    git init
    git remote add origin <https://your/git/repo.git>
    cp homeSync.plist ~/Library/LaunchAgents/
    launchctl load -w ~/Library/LaunchAgents/homeSync.plist
    ```
  13. kevin-smets revised this gist Nov 25, 2016. 1 changed file with 7 additions and 5 deletions.
    12 changes: 7 additions & 5 deletions homeSync.md
    Original file line number Diff line number Diff line change
    @@ -1,8 +1,10 @@
    # Feeling homeSync?

    cd ~
    git init
    git remote add origin <https://your/git/repo.git>
    1. Place homeSync.sh and homeSync.plist in your home dir

    cd ~
    git init
    git remote add origin <https://your/git/repo.git>

    cp homeSync.plist ~/Library/LaunchAgents/
    launchctl load -w ~/Library/LaunchAgents/homeSync.plist
    cp homeSync.plist ~/Library/LaunchAgents/
    launchctl load -w ~/Library/LaunchAgents/homeSync.plist
  14. kevin-smets created this gist Nov 25, 2016.
    8 changes: 8 additions & 0 deletions homeSync.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,8 @@
    # Feeling homeSync?

    cd ~
    git init
    git remote add origin <https://your/git/repo.git>

    cp homeSync.plist ~/Library/LaunchAgents/
    launchctl load -w ~/Library/LaunchAgents/homeSync.plist
    25 changes: 25 additions & 0 deletions homeSync.plist
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,25 @@
    <?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>EnableGlobbing</key>
    <false/>
    <key>Label</key>
    <string>homeSync</string>
    <key>ProgramArguments</key>
    <array>
    <string>sh</string>
    <string>$HOME/homeSync.sh</string>
    </array>
    <key>RunAtLoad</key>
    <true/>
    <key>StandardErrorPath</key>
    <string>/tmp/homeSync.err</string>
    <key>StandardOutPath</key>
    <string>/tmp/homeSync.out</string>
    <key>StartInterval</key>
    <integer>1800</integer>
    <key>WorkingDirectory</key>
    <string>~</string>
    </dict>
    </plist>
    3 changes: 3 additions & 0 deletions homeSync.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,3 @@
    git add .
    git commit -m "Auto commit @ $(date)"
    git push