Sponsored Content
The Lounge What is on Your Mind? New UNIX and Linux History Sections Post 303035647 by Neo on Thursday 30th of May 2019 03:31:32 AM
Old 05-30-2019
Latest:

Code:
<?php
$nodisp = "<script>document.querySelector('.history-community').style.display='none';document.querySelector('.history-lastp').style.margin='0px';</script>";

$flavs = array(
    'unix_linux_history',
    'linux_unix_history',
    'red_hat_history',
    'ubuntu_history',
    'gnu_history',
    'man_page_history',
    'ken_thompson_history',
    'dennis_ritchie_history',
    'linus_torvalds_history',
    'unix_flavors_history',
    'brian_kernighan_history',
    'richard_stallman_history',
    'bill_joy_history',
    'grep_history',
    'awk_history',
    'sed_history',
    'solaris_history',
    'vi_history',
    'unix_like_history');

$final = sizeof($flavs) - 1;
$rand = mt_rand(0, $final);
$flav = $flavs["$rand"];
eval('$history_div_for_user = "' . fetch_template($flav) . '";');

$rand2 = mt_rand(0, 1);
if ($rand2 == 0) {
    $history_div_for_users = $history_div_for_user . $nodisp;
} else {
    $history_div_for_users = $history_div_for_user;
}

$rand2 = mt_rand(2, $final);
$flav2 = $flavs["$rand2"];
eval('$history_div_for_user2 = "' . fetch_template($flav2) . '";');
$history_div_for_homepage = $history_div_for_user2 . $nodisp;

Now displaying two "history blocks" on the home page; and displaying only one "history block" on prior "thin content" pages.

Nineteen done, eighty one to go....

When I get 100 done, I will group them somehow into a small number or arrays, and will then will change the algorithm a bit.

Also, for "thin content" pages like "single post", "tag search results" or "thin content man-pages", etc I will create a simple pattern matching routine to match the array of "_history" entries with the content, so for example solaris man pages will see a lot more solaris _history articles than linux history articles; and ditto for tags, and single post pages, or discussion pages with little content (no replies, etc).

So after 100 *_history templates are done (hopefully I will get 100 done all by myself), I'll write some logic to match content with the history files and stop relying strictly on a few random number generators.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Unix History Question: Why are filenames/dirnames case sentsitive in Unix?

I tried looking for the answer online and came up with only a few semi-answers as to why file and directory names are case sensitive in Unix. Right off the bat, I'll say this doesn't bother me. But I run into tons of Windows and OpenVMS admins in my day job who go batty when they have to deal... (3 Replies)
Discussion started by: deckard
3 Replies

2. Solaris

unix command history

is there any way to determine the last command entered on a unix machine??? Thanx (3 Replies)
Discussion started by: mm00123
3 Replies

3. SuSE

Linux SuSE 10 - Disable Unsuccessful Login History.

When we login to any remote connections in SuSE Linux, say for example, telnet , the following line is displayed "Last Login : Date and time is displayed" I would like to disable this. In SuSE 9, I could find the solution . Please suggest me a solution to disable the line displayed for SuSE... (3 Replies)
Discussion started by: Laksmi
3 Replies

4. Shell Programming and Scripting

stop users from running 'history -c' in Linux

Hi All, My question is how can i stop my users on system from deleting their history. How can i stop the users from running 'history -c'. I have searched thoroughly on the forum but didn't find any satisfactory solution to the problem. kindly help if you any suggestions Thanx in... (3 Replies)
Discussion started by: xander
3 Replies

5. UNIX and Linux Applications

Unix History

Hi everybody Im Megadrink!!! This is my first thred. Ive recently been introduced to Unix and i was interested in Unix's History. Can anyone give me a breif History On Unix. Just when it was invented/released. Maybe someother cool things about it. Thx for the information in advance!! :D (2 Replies)
Discussion started by: Megadrink
2 Replies

6. Linux

History of executed command in Linux

Hi All, Is there a way to check command executed by users in Linux for a specific date? I know we can use history, but it doesn't shows yesterday's executed commands. rgds, (3 Replies)
Discussion started by: ronny_nch
3 Replies

7. UNIX for Dummies Questions & Answers

How to clear history in Linux

Hello All, Good Morning. I am trying to erase history list in my linux box, but my below command is failing. What is the actual way to clear it? > history clear -bash: history: clear: numeric argument required Also when I run my commands in my command prompt, my team lead can see my... (7 Replies)
Discussion started by: NARESH1302
7 Replies

8. Shell Programming and Scripting

History file in UNIX

commands to view the history file in unix. I am not sure whether it is bash_history.sh (1 Reply)
Discussion started by: ramkumar15
1 Replies

9. What is on Your Mind?

The Great History of UNIX (1969-1999) | 30 Years of UNIX History | YouTube Video

I am pleased to announce this new video in 1080 HD for UNIX lovers honoring thirty years of UNIX history spanning from 1969 to 1999 presented in 150 seconds (two and a half minutes) in 1080 HD, celebrating the 50th anniversary of UNIX. The Great History of UNIX (1969-1999) | 30 Years of UNIX... (8 Replies)
Discussion started by: Neo
8 Replies

10. UNIX for Advanced & Expert Users

How to find out and monitor IO spikes history in Linux?

hello all i have application which according to AWS monitoring is reaching to high spikes of IO at random time . and causing the server to crash and restart . my question is how can i find out what cause the spike and if i can't with the native linux tools what free open source minimon... (6 Replies)
Discussion started by: umen
6 Replies
MojoMojo::Formatter::TOC(3pm)				User Contributed Perl Documentation			     MojoMojo::Formatter::TOC(3pm)

   module_loaded
       Return true if the module is loaded.

NAME
MojoMojo::Formatter::TOC - generate table of contents DESCRIPTION
This formatter will replace "{{toc}}" with a table of contents, using HTML::GenToc. If you don't want an element to be included in the TOC, make it have "class="notoc"" METHODS
format_content_order The TOC formatter expects HTML input so it needs to run after the main formatter. Since comment-type formatters (order 91) could add a heading for the comment section, the TOC formatter will run with a priority of 95. format_content Calls the formatter. Takes a ref to the content as well as the context object. The syntax for the TOC plugin invocation is: {{toc M- }} # start from Header level M {{toc -N }} # stop at Header level N {{toc M-N }} # process only header levels M..N where M is the minimum heading level to include in the TOC, and N is the maximum level (depth). For example, suppose you only have one H1 on the page so it doesn't make sense to add it to the TOC; also, assume you and don't want to include any headers smaller than H3. The {{toc}} markup to achieve that would be: {{toc 2-3}} Defaults to 1-6. SEO-friendly anchors Anchors should be generated with SEO- (and human-) friendly names, i.e. out of the entire token text, instead of being numeric or reduced to the first word(s) of the token. In the spirit of http://seo2.0.onreact.com/top-10-fatal-url-design-mistakes, compare: http://beachfashion.com/photos/Pamela_Anderson#In_red_swimsuit_in_Baywatch vs. http://beachfashion.com/photos/Pamela_Anderson#in "Which one speaks your language more, which one will you rather click?" The anchor names generated are compliant with XHTML1.0 Strict. Also, per the HTML 4.01 spec, anchor names should be restricted to ASCII characters and anchors that differ only in case may not appear in the same document. In particular, an anchor name may be defined only once in a document (logically, because otherwise the user agent wouldn't know which #foo to scroll to). This is currently a problem with HTML::Toc v1.11, which doesn't have support for passing the already existing anchors to the "templateAnchorName" sub. assembleAnchorName http://search.cpan.org/dist/HTML-Toc/Toc.pod#templateAnchorName SEE ALSO
MojoMojo and Module::Pluggable::Ordered. AUTHORS
Dan Dascalescu, <http://dandascalescu.com> LICENSE
This library is free software. You can redistribute it and/or modify it under the same terms as Perl itself. perl v5.14.2 2010-05-23 MojoMojo::Formatter::TOC(3pm)
All times are GMT -4. The time now is 05:17 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy