Tricks: Miscellaneous


These worked for me once, maybe not now, maybe for no one else. See source for the source code.

  1. Wanting NO vertical space before a ul> and ol> and a list in html:

    1. Reference http://stackoverflow.com/questions/7759229/remove-space-between-paragraph-and-unordered-list:

      Using ol style="margin-top:-15px;". Works but the -15 is use specific it seems.

      1. Heck
      2. Heck

    2. Reference http://stackoverflow.com/questions/7759229/remove-space-between-paragraph-and-unordered-list:

      Just use dl> and /dl> to surround your list. Seems to work like a charm.
      1. Heck
      2. Heck

  2. See Uncombining and ungrouping items in Windows 7 for getting taskbar icons spread out. A few steps, but it seems to work well: quoting:

    1. "First, you can disable taskbar stacking by right clicking on the taskbar, diving into Properties and clicking Never combine.
    2. This might work for you but it's not ideal because now the stupid taskbar buttons take up an inordinate amount of space. Fortunately, we can hack Windows a little bit to force it to set the button width to a smaller value. This way our taskbar icons will both remain ungrouped and also take up less screen real estate.
    3. Click Start and type open the infamous Registry Editor
               regedit 
      Before you do anything, click File, Export to save a backup then click through to the following registry path:
               Computer\HKEY_CURRENT_USER\Control Panel\Desktop\WindowsMetrics 
    4. Now right click on an empty part of the screen, choose New and pick String Value We're going to create a new string called: MinWidth Since I'm using large buttons, I set my value to 52; however, small button users should use 38. These numbers must be exact or you'll run into more problems than Nene Leakes on the Real House Wives of Atlanta. Yeah, you don't want that. Then edit string, and value to 52 or 38. Click OK, close the Registry Editor then just log off and log on again to see the changes."

  3. Next trick: Getting menu "file, view, edit, help" back on toolbar the new firefox: This is seems to be the only way to get print preview back---which is necessary since the new firefox always prints the wrong size. Stupid updates keep hiding the menu bar.

    1. Alt and Alt-f work for a moment, but if you really want it back and you should:
    2. See How to get back File, Edit, View, etc on toolbar? for

      Here's how to get that menu (which displays File, Edit, View, Tools and Help):
      1. Click (and release) the "Alt" key. This should make this menu temporarily visible.
      2. Under "Tools", select "Folder options...".
      3. Go to the "View" tab. (It should be the second of three tabs.)
      4. In the "Advanced settings" section, under "Files and Folders", make sure that the "Always show menus" option is checked or ticked.
      5. Click "OK". That should do it.

      Well that doesn't quite work for me. I tried: Alt / view / toolbars / menu bar / check.
      This works for me up until 2021aug24.

    3. Go to the open menu on the upper right / customize / at bottom Toolbars / check menu bar. This works 2019jul15, but not now.

  4. Next trick: See pdf search problem:

    "I cannot search a pdf file in Firefox. I select Edit form the menu bar then Find from the drop-down menu. I then enter a search work in the text box bottom right but it simply turns red and does nothing. When I display the same pdf file in Internet Explorer it works.

    Chosen solution: I resolved this issue by going into Tools/Options and changing the setting for 'Adobe Acrobat Document' from 'Use Acrobat reader (in Firefox)' to 'Use Acrobat Reader (Default)'. Sounds illogical to me but it works. "

    Doesn't work for me.

  5. How to convert pdf to jpg. Well usually your will not have the right option. However in Unix, the "convert" command seems to do the trick. : pdf to jpg without quality loss; gscan2pdf suggests:
    1. convert tmp.pdf tmp.jpg for low quality.
    2. convert -density 300 tmp.pdf tmp.jpg for better quality.
    3. convert -density 500 tmp.pdf tmp.jpg for about the same quality.

  6. How to change the default log-off time on a windows something computer. It may be really easy, but online forums give a ton of stuff that made no sense to me.
    1. Finally start/control panel/hardware and sound/power options/edit plan settings/put the computer to sleep gives maybe the right options. Why not something that says automatic logoff!!!! "That would be the easy way."

  7. How to add page breaks to html? LVSYS suggests:
    1. <p><!-- pagebreak --></p> which is just a comment. But this doesn't work for me. Does nothing.
    2. via CSS - for the advanced HTML users: <p style="page-break-after:always;"></p> which does work for me.
    3. See test_pagebreak.html for tests and use print preview to see the page breaks.

  8. Getting cached sites: see How to get to a cached link: Just do a google search and click on the little bitsy down arrow beside the green URL of an item. But there may be no arrow!!!!

  9. Next trick: How can I grep for a string that begins with a dash/hyphen?: Instead of grep '-x' use grep -- -x. But that doesn't always work it seems.

    How about a general verbatim grep?: Use grep -F '...'. But that doesn't always work it seems either.

    The combined grep -F -- '-x' seems to work for the moment. Examples: grep -F -- '(c. ' *html , grep -F -- '-c. ' *html .

  10. 2019 Jan04: Some vi tricks.
    1. Some vi commands.
    2. vi search and replace.
    3. use \ for each character to be treated verbatim.

  11. 2019 Apr12: Preventing hyperlinks in Gmail:
    1. Try quotes: "http://www.physics.unlv.edu/~jeffery/" | Nope.
    2. Try underline: _http://www.physics.unlv.edu/~jeffery/ | Nope.
    3. Try deception: http://www.physics.unlv.edu/~jeffery/ | Nope.
    4. Try deception: www.physics.unlv.edu/~jeffery/ | Nope.
    5. www.physics.unlv.edu/~jeffery/ | Nope.
    6. Just set the Gmail to Plain Text using the 3-dot icon in the lower right-hand corner of the compose window. | Nope. It looks like plain text but click on it and it's hyperlinked on reception.
    7. Try physics.unlv.edu/~jeffery/ | Nope, but it doesn't recognize the URL either.
    8. Try (U+2024) for dot: wwwU+2024physics.unlv.edu | Nope.
    9. Try xxx.physics.unlv.edu/~jeffery/ | Nope, but it doesn't recognize the URL either.
    10. Try omit.www.physics.unlv.edu/~jeffery/ | Nope, but it doesn't recognize the URL either.
    11. | Nope.
    12. | Nope.
    13. Use the 3-dot icon to get "Show Original" and you just get the html version. That's good for reading, but how about sending?
    14. How about just breaking the URL:
                  www.physics.unl
                  v.edu/~jeffery/ 
      This works in that it can be copied and pasted and and the fragments are NOT recognizable as real URLs. NOT elegant, but the best I can do.

  12. How to keep SSH connections alive: This is non-cryptic. It says exactly what to do in followable instructions. But it doesn't guarantee it'll work.

  13. Extracting a file from a tar file: For example: tar -xf www_2017_11_05_nov05.tar ./astro/ial/ial_031/hubblediagram.pdf tar tricks

  14. A link to a specific google search: just go | a href="https://www.google.com/search?q=Etruscans">Etruscans | for example: i.e., Etruscans.
  15. tar -tvf archive.tar : List all files in archive.tar verbosely. Works
    tar --extract --file www_2019_11_03_nov03.tar ./course/c_astint/homewk/ : Works to get everything in a directory. But most extract commands don't work for no good reason.
    Reference: https://www.gnu.org/software/tar/manual/html_node/extracting-files.html#SEC27
    Reference: https://www.makeuseof.com/extract-single-file-or-directory-from-tar-or-targz/
  16. Testing a microphone attached to computer with windows 7 Everything works except no "Monitorning" happens. At first, then after awhile it works. Why?
    "Right-click on the volume thing in your taskbar, and select "recording devices". This will open a dialog box with four tabs. Make sure the second tab "Recording" is selected. There you should see your microphone, with a bar showing if it is receiving sound or not. You can also check its properties here. If your system allows "Monitoring" that will echo the microphone through your own speakers to test."
    Click on "Properites" and the "Levels" for a slider for volume.

  17. Keeping putty from ending a session: see How to make putty to not break my session after some time? The best idea may be under Configuration: Connection to send null packets at 300 second intervals. Let's see if this works on my machine.

  18. To keep windows 10 from powering off to soon see: Windows 10 logging out automatically - How do I change that? and though it doesn't seem quite right step by step for my machine, I may have effected the change.

  19. shred command in UNIX and related commands:
    1. dd: man dd totally unclear. See Wikipedia: dd (Unix) for not much more.
    2. scrub: man scrub at least the options are clear, the physics system know not scrub.
    3. shred: man shred unclear. See Wikipedia: shred. For practical information, see Linux shred command:
      1. shred -u filename: deletes file not just overwrites it.

  20. Getting Firefox to refresh when it's not doing that. Hold down shift key and then refresh. See Why is firefox refusing to load any images on webpages properly? (2018).
  21. Click on taskbar/taskbar_settings/ to get how to adjust:
    1. Combine taskbar buttons to get them uncombined.
  22. Note taskbar is microsoft, menu bar is firefox using firefox browser.
  23. No sound on astro lab computers? Right click on lower toolbar then click /taskbar settings/home/system/sound and set output device to "Speaker (Realtek(r) Audio)".
  24. Winscp or winscp shortcut:
    1. right click on windows desktop.
    2. select "new" then "shortcut" and that opens a window.
    3. browse for the file to be the destination of the "shortcut".
    4. next: name for shortcut xxx. This puts the new shortcut xxx on the desktop.
    5. launch xxx.
    6. click "New Session" 3rd from top of toolbar on the right.
    7. A dialog box opens and enter new hostname or select from menu if it is on the menu. This is the transfer site
    8. A login box opens. Login.
    9. On the rightside of the winscp box is the new transfer site.
    10. Click "session" on new transfer site and click "save session". But "sesssion" may not be on the toolbar. If not, right click on "toolbar" and click on "customize toolbar" and check "session". Then Click "session" and "save session". If "customize toolbar" is greyed out, then you are out of luck.
    11. A dialog box opens. Do NOT save passwd.
    12. Create on desktop if you wish.
    13. On desktop rename to what you want.