In tmux, when you type / in copy mode, you get a prompt Search Down: xxx where xxx is the most recent search performed in that same pane. Is it possible to access the history of previous searches? ie, I am looking for a plugin (or patch) that will not display xxx unless I request it (say, with up-arrow), and that makes it possible to access older searches and searches from other panes. Is similar functionality available?
Related
The browser history of Safari is stored in ~/Library/Safari/History.db which is a regular SQLite database. For example, it can be viewed using SQLite Browser or queried using Python.
The database contains a table named history_items. This lists all URL's, with their title, and id and the total number of time the website was visited. Another table is named history_visits. This lists all individual visits, with a timestamp, id and, possibly, information about the source which redirected the user to this website.
In the Chrome browser history, the transition type is also stored. This notes whether the user arrived at the website via a link, a reload or whether he typed in the address directly. Is such transition information also available in the Safari History.db?
The table history_visits also contains integer columns named origin, generation and attributes. However, it is unclear to me what these mean. Is there a documentation available for the Safari browser history database?
Checked with my history, the origin column seems to show the origin of the database entry. In my case it was 0 for the MacBook running Safari (where I checked the contents of History.db and 1 for history entries from my iPad (history gets synced over iCloud). The generation column might have something to do with "generations of histories". I found the entries current_generation and last_synced_generation in the metadata table, which would suggest it having something to do with syncing the history to the cloud. This is only an educated guess though. As for attributes I'm still kind of stumped.
Again I come to you guys for your expertise and advice on an issue that I am having. I was wondering if any of you would know how to detect if a web page has been modified using VB.NET. I need to be able to set up a task which periodically (like once a week) scans the user inputted web pages and if the web page content has changed, I need to fire off an email to an individual that it has changed (not the exact location on the page itself). I'll be storing the HTTP status and of course the page data itself as well as the date of when it was last modified. Of course this needs to be very fault tolerant since it could be another week before the check runs again. Any help would be great. Thank you.
EDIT
New twist on this question sorry. I had more time to think about what we wanted. So... Detecting ANY change on a web page would be kind of silly since time dependent elements of the page would change every so often. Instead, what I would like to do is be able to detect the documents in the page. For instance if there are excel, word docs, or pdfs that get changed on that page. So, I'd run the hash on these documents then on some sort of schedule do a check to see if new documents have been added or if the old documents have been modified. Any suggestions on how to detect the documents embedded on the page and running the hash? Thanks again!
As I mentioned in a comment, this sort of job is what checksums (also known as hash functions) were designed for.
You code for will look something like this:
- for each webpage of interest
- pull webbpage
- calculate checksum of contents
- is current checksum different to last checksum?
- if yes, send email
- store new checksum and other appropriate data
The .Net framework has a number of checksums available. The two most popular are MD5 and sha1
In addition to the checksum option, there are also various Diff function that achieve this, and provide much more information than changed=true/false. This question has more info:
How to tell when a web page has changed by x% in VB.net?
I created a very small script (without saving) in RCmdr top window, but I only saved the workspace.
When I reload this I can't see anything that was in the top window originally. My mistake I know, but is there a way to see any hint of the functions etc I may have called, from the workspace file? I can see the objects - but not what created them.
If you open a new R session, try hitting the up-arrow keys. The normally invisible .Rhistory file is usually loaded at the start of a new session if the prior session ended normally. If the session is open in a GUI hten you may be able to display the list of commands with a menu command. This may also display that file:
loadhistory(file = ".Rhistory")
The history is cumulative, so unless you had a really long session intervening you may still be able to get code going back for several session. I think it keeps the last 500 entries by default. Actually turns out to be 512. See:
?history
I want to make a small plugin for awesome WM that will show a number of unread messages pending in Thunderbird. I want to fetch the number of messages accessing directly Thunderbird sqlite base. The question is: which base, table and fields should I query?
There are at least 15 bases under ~/.thunderbird/profile/, including ./global-messages-db.sqlite. In this base I tried messageAttributes table, but with no big success. I could not find development documentation describing the attributes...
Any help here?
You will find what you need in the global-messages-db.sqlite file. If you watch the messages table, you will find a column jsonAttributes. In there you will find a JSON array, from attribute ids and their value. The key 58 is the read-status of a message. So if you find something like {"58": false} in this column the message is still unread. But this database won't be updated immediately when a new message is received. (It might even be updated only, when you close Thunderbird -- I am not sure about that.)
So as you see finding unread messages that way will be a bit of the hard way to go. I would recommend you to better create a plugin, that is directly checking the server via IMAP or POP3.
For IMAP servers there already exist an awesome-plugin inside the Delightful Extensions. I don't know of any POP3 plugin, and as it seems POP3 libs for lua are also rare to find.
I use screen, but am willing to switch to tmux if it and only it has this functionality.
I have a screen named "X", and also other screens with different names. I would like a script to execute something different based on which screen it is run from. I would like to use a command such as:
screen name_of_current
To tell me the name of the screen (if any) I am currently in. Does such a thing exist in screen or tmux?
You can use $TMUX which will tell you where the window was when it was originally created. But if you've moved it or linked it into multiple sessions it'll be inaccurate.
You can also use eg tmux display -p '#S' but although the session should be accurate other items (such as #W #I #P) are the CURRENT window and pane not necessarily where the command was run.
In the Subversion repository latest of tmux, each pane has a unique identifier in $TMUX_PANE so you can then do:
$ tmux display -pt $TMUX_PANE '#S:#I.#P'
Which should be accurate.