The jist
gem is deprecated and has been forked and improved to the gist
gem. See defunkt/gist.
conradirwin / jist Goto Github PK
View Code? Open in Web Editor NEWJist just gists
License: MIT License
Jist just gists
License: MIT License
The jist
gem is deprecated and has been forked and improved to the gist
gem. See defunkt/gist.
This makes it uncomfortable for packaging jist, especially because this repo does not use tags, so I have to fetch the README by commit or sync it locally.
Dash as stdin
First, I'd like to thank you for this, this is great. I'd been looking for an alternate to the gist
by defunkt but currently it's broke. This looks real nice. However not all my scripts are able to be uploaded:
jist -p -d "Firefox settings restorer" -f ff-restore.sh ff-restore
Error: Got Net::HTTPInternalServerError from gist:
Not sure the details but I think this has to do with the file itself somehow (or the characters in it?) as other scripts that I have definitely get uploaded. Even without options I get this too. Two scripts that I know have this are: ff-restore and pm. Any help in debugging let me know.
∴ jist
(type a gist. <ctrl-c> to cancel, <ctrl-d> when done)
^C/Users/me/.rvm/gems/ruby-1.9.3-p194@dtf/gems/jist-0.7/bin/jist:83:in `read': Interrupt
from /Users/me/.rvm/gems/ruby-1.9.3-p194@dtf/gems/jist-0.7/bin/jist:83:in `<top (required)>'
from /Users/me/.rvm/gems/ruby-1.9.3-p194@dtf/bin/jist:23:in `load'
from /Users/me/.rvm/gems/ruby-1.9.3-p194@dtf/bin/jist:23:in `<main>'
This is after hitting Control-C combination, as requested, for cancellation.
Then finally (for now),
opts.on("-r", "--reformat", "Process the input through vim's equalprg to reformat") do
options[:reformat] = true
end
This one will be a super duper feature, though I suspect the implementation will cause you to wince.
The reason why I'm advocating vim for this is because it can do filetype detection for things with extensions or even for bare content (as long as it has a bangpath or a modeline), then people have already solved the reformatting problems.
It would be nice to take a one-liner then jist it to clean it up. Again, -N
has a role in being a cool thing here.
I'm getting Error: invalid byte sequence in UTF-8
when jisting a PNG file (jist -d 'blah blah' file.png
)
There are a couple in here we could use, all related to managing existing gists:
https://github.com/vim-scripts/Gist.vim
Delete the gist (you need to have opened the gist buffer first).
Password authentication is needed.
:Gist -d
Fork the gist (you need to have opened the gist buffer first).
Password authentication is needed.
:Gist -f
Star the gist (you need to have opened the gist buffer first).
Password authentication is needed.
:Gist +1
Unstar the gist (you need to have opened the gist buffer first).
Password authentication is needed.
:Gist -1
Get gist XXXXX and add to clipboard.
:Gist -c XXXXX
List your public gists.
:Gist -l
List gists from user "mattn".
:Gist -l mattn
List everyone's gists.
:Gist -la
List gists from your starred gists.
:Gist -ls
Hi,
i was using Jist without problems . after a backup i reinstalled it .. but i'm having this error :
https://gist.github.com/epifanio/5453075
Error: Got Net::HTTPForbidden from gist: Missing or invalid User Agent string.
People can't get to here from defunkt/gist.
My proposal is that you move the repo, fork gist, then re-import the current code/history.
Down with abandonware!
Is it possible to select the language without having to use the extension? I noticed by accident that I can do this by doing:
jist -p -d "example description" -f file.sh file
and then push
ing it:
git init
git remote add reponame [email protected]:<number>.git
git add file
git commit -a -m "message"
git push --force reponame master
where file is the filename without the extension. and by doing this, I am able to get syntaxhighlighting without the extension example.
Because of this I was wondering if it was possible, or could this just be a loophole?
If you have a low-$LINES window, this bit gets pushed up by the paragraphs:
Usage: jist [-o|-c] [-p] [-d DESC] [-t TOKEN|-a] [-u URL] [-P] [-f NAME]* FILE*
jist --login
I think if you leave the version line where it is, but move that line above the options breakdown, it'll be better balanced.
What about a dep on launchy for the -o flagcommand?
There's on OS X with tmux running, pbcopy/pbpaste stop working, as a separate issue.
Regardless of that other breakage, when you're in tmux and echo sad | jist -c
it fails with the bad error message:
Error: exception class/object expected
Use-case: upload an opaque binary file to a gist. (eg ASCII 8-bit)
String conversion (not) being performed somewhere?
As the tiitle, How can I show gists list I own? will support this?
jist -e should jump you into something like ${VISUAL:-${EDITOR:-vim}} before it gists.
Maybe mention that vim can do :cq so you can abort the gist if you want. I'm not sure how other editors signal an abend, but I kind of don't care. ☺
gist had clipboard.
This software is gawbij.
I now have push access to the gist
gem, and so we should replace gist
by jist
.
Talking with @indirect, changes that we want for this:
gist -p
creates a private gist, jist -p
contains a "public" gist.gist -t
should set the file type, jist -t
is the Oauth access tokenopts.on("-j", "--join", "Replace newlines with a single space") do
options[:join] = true
end
opts.on("-J", "--join-without-spaces", "Remove all newlines") do
options[:join_without_spaces] = true
end
Works well this:
opts.on("-N", "--no-gist", "Instead of uploading, replace the clipboard contents.") do
options[:no_gist] = true
end
…which makes -e
take on a whole new life as: alias clipedit='jist -Ne'
And I know this is is not in keeping with a gem that "just gists".
But it's really a huge use case, IMO. I've used Clipboard.pm's clipedit and clipjoin countless times. Would be nice to get these features with a simple gem install jist
+ shell aliases.
At gem installation, yard tries to build docs for it, and spits the following errors:
Building YARD (yri) index for jist-0.7...
[error]: Unhandled exception in YARD::Handlers::Ruby::MethodHandler:
[error]: in `lib/jist.rb`:26:
26: def gist(content, options={})
[error]: NoMethodError: undefined method `length' for nil:NilClass
[error]: Stack trace:
/Users/jeffs/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/yard-0.8.2.1/lib/yard/tags/default_factory.rb:139:in `extract_types_and_name_from_text_unstripped'
/Users/jeffs/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/yard-0.8.2.1/lib/yard/tags/default_factory.rb:126:in `extract_types_and_name_from_text'
/Users/jeffs/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/yard-0.8.2.1/lib/yard/tags/default_factory.rb:76:in `parse_tag_with_types_name_and_default'
/Users/jeffs/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/yard-0.8.2.1/lib/yard/tags/default_factory.rb:88:in `parse_tag_with_options'
/Users/jeffs/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/yard-0.8.2.1/lib/yard/tags/library.rb:237:in `send_to_factory'
/Users/jeffs/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/yard-0.8.2.1/lib/yard/tags/library.rb:172:in `option_tag'
[error]: Unhandled exception in YARD::Handlers::Ruby::MethodHandler:
[error]: in `lib/jist.rb`:45:
45: def multi_gist(files, options={})
[error]: NoMethodError: undefined method `length' for nil:NilClass
[error]: Stack trace:
/Users/jeffs/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/yard-0.8.2.1/lib/yard/tags/default_factory.rb:139:in `extract_types_and_name_from_text_unstripped'
/Users/jeffs/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/yard-0.8.2.1/lib/yard/tags/default_factory.rb:126:in `extract_types_and_name_from_text'
/Users/jeffs/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/yard-0.8.2.1/lib/yard/tags/default_factory.rb:76:in `parse_tag_with_types_name_and_default'
/Users/jeffs/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/yard-0.8.2.1/lib/yard/tags/default_factory.rb:88:in `parse_tag_with_options'
/Users/jeffs/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/yard-0.8.2.1/lib/yard/tags/library.rb:237:in `send_to_factory'
/Users/jeffs/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/yard-0.8.2.1/lib/yard/tags/library.rb:172:in `option_tag'
$ jist somescript.py
/home/solstice/.gem/ruby/1.9.1/gems/jist-0.7.1/lib/jist.rb:71:in `multi_gist': Got Net::HTTPInternalServerError from gist: (RuntimeError)
from /home/solstice/.gem/ruby/1.9.1/gems/jist-0.7.1/bin/jist:91:in `<top (required)>'
from /home/solstice/.gem/ruby/1.9.1/bin/jist:23:in `load'
from /home/solstice/.gem/ruby/1.9.1/bin/jist:23:in `<main>'
It's the same error wether or not I have login in and get an oauth token.
Well I can't gist now neither so may be that's a server problem.
What about a soft dep (i.e., require only when needed + warn about need for installation) of launchy ?
The sensible-browser
command is, AFAIK, a Debian deal, not a Linux deal
(That is, it's never worked for me (and I put off making ~/bin/sensible-browser
because I wanted to fix this issue for others)
I forked the project to add a --copy_js option to jist. It modifies the url before copying to clipboard. The clipboard receives the 'Embed this gist' script tag rather than the plain gist url.
My use case is that I embed scripts on http://www.civet.ws using the 'Embed this jist' option in the web interface.
So, is this worth adding a test and sending a pull request?
Please let me know in this issue thread and if other people find it useful, then I'll add a test and submit a PR :D
It would be useful to be able to update just the filename and/or description, e.g.
jist -u https://gist.github.com/ID -f new-file-name
Currently this requires some input on STDIN.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.