Hacker Newsnew | past | comments | ask | show | jobs | submit | sdovan1's commentslogin

Overriding HOME variable is neat! Make things much easier.


It's not obvious, but the shitt-p is borrowed from an anime character. So it should pronounce like sheet-p: https://ipa-reader.com/?text=%C9%95it%CB%90opi%CB%90


I often need to login to colleagues' machines at work, but I find that their settings are not what I am familiar with. So I wrote an SSH wrapper in POSIX shell which tars dotfiles into a base64 string, passes it to SSH, and decodes / setups on the remote temp directory. Automatically remove when session ends.

Supported: .profile, .vimrc, .bashrc, .tmux.conf, etc.

This idea comes from kyrat[1]; passing files via a base64 string is a really cool approach.

[1]: https://github.com/fsquillace/kyrat/


   scp my-precious-dotfiles remote:~
   trap 'ssh remote rm my-precious-dotfiles' EXIT
   ssh remote
Or you can even bake the trap into the remote bash's invocation, although that'd be a bit harder.


That overwrites the remote dotfiles. Any workarounds?


:h netrw

You can also just place config files anywhere if you know what you then load. That's what I do in my dotfiles, but not exactly like the parent. I also purposefully keep the repo size tiny so it's also just easy to clone. I'd recommend setting a env var so you can always just set that

Also don't forget you can have local vim files. I have a function at the end of my vimrc that looks for '.exrc', '.vim.local', '.nvim.local' in the current directory. Helpful for setting project settings.


I've found lnk [0] to be a nice tool for this. Similar to GNU Stow as another comment mentioned, but plays a bit nicer with git (and, in my opinion, is nicer to use).

Edit: just remembered there was a good comparison of lnk and stow on the HN discussion of lnk from a few months back [1].

[0] https://github.com/yarlson/lnk

[1] https://news.ycombinator.com/item?id=44080514


You can set HOME to some temporary path of your choosing. You’ll still need to be a little careful.


GNU Stow? https://systemcrafters.net/managing-your-dotfiles/using-gnu-...

Keep the alternate sets in different subdirectories.


It's kinda amusing how much of interesting software there is beyond coreutils and GCC that came from GNU, and how little adoption it has actually seen.


If they are in your home dir, does that matter?


I came across something similar a few months ago. I pieced together a working hybrid by patching in parts from an older release with the latest version. I didn't ever work out if the latest version failed because of something in my environment or not, but I'm on a Mac fwiw.

https://github.com/cdown/sshrc


> I often need to login to colleagues' machines at work, but I find that their settings are not what I am familiar with

I'd hate to jump to conclusions, but what username are you looking into what machines with for that to be an issue?


Ok, but what if your colleague does not have Vim installed?

Wouldn't it make more sense to have a tool that brings files over to the local computer, starts Vim on them, and then copies them back?


That starts to sound like using VS Code in remote mode.


Emacs in tramp mode.


I can’t recall encountering a system in the last 15 years that didn’t have vim (or at least vi for esoteric things) on it.


Would not be uncommon in a container or purpose-built VM.


Have you run into that? I can't recall ever facing that issue. Seems very weird to strip down that much and then use a different editor. Do you remember if ed was missing in those machines?


> Do you remember if ed was missing in those machines

I had to laugh out loud. I couldn't imagine such a system, that wouldn't be POSIX compliant. So I looked it up, and indeed, it's entirely possible. Debian doesn't necessarily include it.

https://unix.stackexchange.com/a/609067


Yes I've run into containers where every utility that wasn't needed to run the service was stripped out. Even tools such as "less."


So what was the editor?


While not mandatory, vi is part of the POSIX commands. I mean you could use ed or even hack your way with awk, sed, and/or grep but no one wants to deal with that bullshit. And if you're installing vi you might as well install vim, right?

I've been on a lot of systems and can't remember a single instance of not having vi (though I do vim). So pretty rare, like you said

https://en.wikipedia.org/wiki/List_of_POSIX_commands


We usually work on the VM with daily-built ISO. For example, I would compile and upload Java program to the frontend team member's VM, and type "srt" for "systemctl restart tomcat."


How much time does it add when running e.g. "shittp user@lan-host uname" ?


FWIW, it's HTML ruby tag, not the language.

https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/...



A dotfiles carrier for SSH session called shittp[1], inspired by kyrat[2]

[1] https://github.com/FOBshippingpoint/shittp

[2] https://github.com/fsquillace/kyrat


> The next time you’re about to name your project after your favorite anime character, pause. Ask yourself: “Would a civil engineer name a bridge support system this way?” If the answer is no, choose a better name.

I'm creating a dotfiles to remote SSH session tool in shell. At first, I wanted to call it "sship", but that name was already taken. Something like "ssh-dotfiles-carrier" felt too long for a command, and abbreviating it to "sdc" would lose the meaning.

So yes, I eventually named it "shitt-p" (character of Hitman Reborn!), since I wanted it to relate to "sh"...


- Java Design Patterns

https://java-design-patterns.com/


Love how you were downvoted for mentioning Java.


The JS community is so freaking strange sometimes.


I've worked with a hospital, their electric medical records are written in XML, and use XSLT to render HTML.


They will be able to do that in perpetuity.

It's just direct browsing support for rendering using XSLT that's removed.


XSLT is terrible though, at least XQuery is a nice language.


Which is one excellent use of XSLT. It is not that useful for general web.


From https://chromeenterprise.google:

> For over a decade, Chrome has supported millions of organizations with more secure browsing – while pioneering a safer, more productive open web for all.

… and …

> Our commitment to Chromium and open philosophy to integration means Chrome works well with other parts of your tech stack, so you can continue building the enterprise ecosystem that works for you.

Per the current version of https://developer.chrome.com/docs/web-platform/deprecating-x..., by August 17, 2027, XSLT support is removed from Chrome Enterprise. That means even Chrome's enterprise-targeted, non-general-web browser is going to lose support for XSLT.


Most people who use xslt like the grandparent described were never using it on the client side but on the server side. Nothing google chrone does will effect the server side.


To clarify: initially, the first web browser evolved from a SGML-based documentation browser at CERN. This was the first vision of the web: well-structured content pages, connected via hyperlinks (the "hyper" part meaning that links could point beyond the current set of pages). So, something like a global library. Many people are still nostalgic to this past.

Surprisingly, the "hyperlinked documents" structure was universal enough to allow rudimentary interactive web applications like shops or reservation forms. The web became useful to commerce. At first, interactive functionality was achieved by what amounted to hacks: nav blocks repeated at every page, frames and iframes, synchronous form submissions. Of course, web participants pushed for more direct support for application building blocks, which included Javascript, client-side templates, and ultimately Shadow DOM and React.

XSLT is ultimately a client-side template language too (can be used at the server side just as well, of course). However, this is a template language for a previous era: non-interactive web of documents (and it excels at that). It has little use for the current era: web of interactive applications.


What makes XSLT inherently unsuitable for an interactive application in your mind? All it does is transform one XML document into another; there's no earthly reason why you can't ornament that XML output in a way that supports interactive JS-driven features, or use XSLT to built fragments of dynamically created pages that get compiled into the final rendered artifact elsewhere.


My only use of XSLT (2000-2003) was to make interactive e-learning applications. I'd have used it in 2014 too, for an interactive "e-brochure", if I could have worked out a cross-browser solution for runtime transformation of XML fragments. (I suspect it was possible then but I couldn't work it out in the time I had for the job...)

If you can use it to generate HTML, you can use it to generate an interactive experience.


What if you used JS to make XSLT interactive? :-)


I have three different way to open file with vim: v: vim (or neovim, in my case) vv: search/preview and open file by filename vvv: search/preview and open file by its content

    alias v='nvim'
    alias vv='f=$(fzf --preview-window "right:50%" --preview "bat --color=always {1}"); test -n "$f" && v "$f"'
    alias vvv='f=$(rg --line-number --no-heading . | fzf -d: -n 2.. --preview-window "right:50%:+{2}" --preview "bat --color=always --highlight-line {2} {1}"); test -n "$(echo "$f" | cut -d: -f1)" && v "+$(echo "$f" | cut -d: -f2)" "$(echo "$f" | cut -d: -f1)"'


JIRA web eats all my memory on Firefox, so laggy that pressing a button takes 3 or 5 seconds, not to mention page transitions. It only becomes usable when I add the uBlock Origin rule[1]:

  yourcomany.atlassian.net##+js(aeld, /^(?:mousemove|pointermove|pointerout|pointerover|touchmove)$/)
[1] https://community.atlassian.com/forums/Jira-questions/Re-Re-...


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: