Skip to content

Instantly share code, notes, and snippets.

@jhgjhtuytdfbnfvmnbgjtuydt
Forked from coderofsalvation/usage.md
Created November 25, 2017 16:20
Show Gist options
  • Save jhgjhtuytdfbnfvmnbgjtuydt/f83bcbaedce9017fbc1e120aad5ed743 to your computer and use it in GitHub Desktop.
Save jhgjhtuytdfbnfvmnbgjtuydt/f83bcbaedce9017fbc1e120aad5ed743 to your computer and use it in GitHub Desktop.

Revisions

  1. @coderofsalvation coderofsalvation revised this gist Apr 25, 2016. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion usage.md
    Original file line number Diff line number Diff line change
    @@ -16,6 +16,6 @@ or in console vim, do a visual selection and then press `:` and type `.! xclipmd
    ## Install

    $ cd ~/bin
    $ wget "https://gist.github.com/coderofsalvation/7ff980326e9f75261eee8f8e0896ac3b/raw/7beb0288efc4769348d146cc020e18ca026aa81b/xclip"
    $ wget "https://gist.github.com/coderofsalvation/7ff980326e9f75261eee8f8e0896ac3b/raw/1353c3e57598c1ad6c3b44359d9c8f79a5a6433b/xclip"
    $ wget "https://gist.github.com/coderofsalvation/7ff980326e9f75261eee8f8e0896ac3b/raw/68c86602127e14adb58b2fd248608af2df878fae/xclipmd"
    $ chmod 755 xclip xclipmd
  2. @coderofsalvation coderofsalvation revised this gist Apr 25, 2016. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion xclip
    Original file line number Diff line number Diff line change
    @@ -2,5 +2,5 @@
    if [[ "$(uname)" =~ Darwin ]]; then
    cat - | pbcopy
    else
    cat - | IS_MAC=1
    cat - | xclip
    fi
  3. @coderofsalvation coderofsalvation revised this gist Apr 25, 2016. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions usage.md
    Original file line number Diff line number Diff line change
    @@ -9,13 +9,13 @@ $ cat ~/projects/foo/somefile.js | xclipmd
    ```

    or in vim, do a visual selection and then press `:` and type `.! xclipmd`:
    or in console vim, do a visual selection and then press `:` and type `.! xclipmd`:

    (and paste into slack etc)

    ## Install

    $ cd ~/bin
    $ wget "https://gist.github.com/coderofsalvation/7ff980326e9f75261eee8f8e0896ac3b/raw/7beb0288efc4769348d146cc020e18ca026aa81b/xclip"
    $ wget ""
    $ wget "https://gist.github.com/coderofsalvation/7ff980326e9f75261eee8f8e0896ac3b/raw/68c86602127e14adb58b2fd248608af2df878fae/xclipmd"
    $ chmod 755 xclip xclipmd
  4. @coderofsalvation coderofsalvation revised this gist Apr 25, 2016. 1 changed file with 8 additions and 1 deletion.
    9 changes: 8 additions & 1 deletion usage.md
    Original file line number Diff line number Diff line change
    @@ -11,4 +11,11 @@ $ cat ~/projects/foo/somefile.js | xclipmd

    or in vim, do a visual selection and then press `:` and type `.! xclipmd`:

    (and paste into slack etc)
    (and paste into slack etc)

    ## Install

    $ cd ~/bin
    $ wget "https://gist.github.com/coderofsalvation/7ff980326e9f75261eee8f8e0896ac3b/raw/7beb0288efc4769348d146cc020e18ca026aa81b/xclip"
    $ wget ""
    $ chmod 755 xclip xclipmd
  5. @coderofsalvation coderofsalvation created this gist Apr 25, 2016.
    14 changes: 14 additions & 0 deletions usage.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,14 @@
    ## In action

    ```
    $ cat ~/projects/foo/somefile.js | xclip
    (paste into browser)
    $ cat ~/projects/foo/somefile.js | xclipmd
    (paste into markdowncompatible website like slackchat etc)
    ```

    or in vim, do a visual selection and then press `:` and type `.! xclipmd`:

    (and paste into slack etc)
    6 changes: 6 additions & 0 deletions xclip
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,6 @@
    #!/bin/bash
    if [[ "$(uname)" =~ Darwin ]]; then
    cat - | pbcopy
    else
    cat - | IS_MAC=1
    fi
    6 changes: 6 additions & 0 deletions xclipmd
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,6 @@
    #!/bin/bash
    {
    echo '```'
    cat -
    echo '```'
    } | xclip