Showing posts with label hacks. Show all posts
Showing posts with label hacks. Show all posts

Tuesday, April 19, 2016

Display element ids for debugging Shiny apps

My current Shiny project contains at least five tables and I constantly forget how they are called. So I whipped up a little bookmarklet that uses jQuery to show the id of each div and input. Some of those can be ignored as they are internal names set by Shiny, but most are the actual names you define in R.

Drag this link to your bookmarks: Show IDs


Friday, July 15, 2011

SSH to same directory on other server

In my work environment, home directories are shared across servers. I often realize that I need to run a script on another server, e.g. due to RAM requirements or other jobs running on the current server. I finally figured out how to log in to the other server while staying in the same directory:

ssh -t server cd `pwd` "&& $SHELL"

(Of course, you can define aliases for different servers.)

Monday, March 16, 2009

A little hack: "mark as read" for FriendFeed

FriendFeed is missing one important thing: the ability mark posts that didn't change since you last saw them as "read." Ideally, new posts or posts with new comments should be visually different from those that are unchanged.


I created a bookmarklet that lets you put a visual indicator of your last visit to FriendFeed into the stream of posts. (You should click the bookmarklet when you begin reading, because during reading you won't see posts that are posted while you read. New and updated posts will percolate to the top, and appear on top of the marker.) It works by using the FriendFeed API to create a post to a special room. As this is a hack, you'll have to adapt the bookmarklet.

Steps:
  1. create a (private) room, e.g. USER-read
  2. drag this link to your button bar: FFread (RSS readers might mangle this)
  3. adapt the bookmarklet, substituting USER for your username (2x) and KEY for your remote key (1x)
  4. go to FriendFeed and test it
  5. optional: see how often you are visiting FriendFeed and calculate how much time you wasted :-)
Update: This worked in Firefox 3.0. I updated to the Firefox 3.1 / 3.5 beta, and it doesn't work anymore. :-/