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
Devel::REPL::Plugin::OutputCache(3pm)			User Contributed Perl Documentation		     Devel::REPL::Plugin::OutputCache(3pm)

NAME
Devel::REPL::Plugin::OutputCache - remember past results, _ is most recent SYNOPSIS
> 21 / 7 3 > _ * _ 9 > sub { die "later" } sub { die "later" } > _->() Runtime error: later DESCRIPTION
Re-using results is very useful when working in a REPL. With "OutputCache" you get "_", which holds the past result. The benefit is that you can build up your result instead of having to type it in all at once, or store it in intermediate variables. "OutputCache" also provides "$_REPL->output_cache", an array reference of all results in this session. Devel::REPL already has a similar plugin, Devel::REPL::Plugin::History. There are some key differences though: Input vs Output "History" remembers input. "OutputCache" remembers output. Munging vs Pure Perl "History" performs regular expressions on your input. "OutputCache" provides the "_" sub as a hook to get the most recent result, and "$_REPL->output_cache" for any other results. Principle of Least Surprise "History" will replace exclamation points in any part of the input. This is problematic if you accidentally include one in a string, or in a "not" expression. "OutputCache" uses a regular (if oddly named) subroutine so Perl does the parsing -- no surprises. CAVEATS
The "_" sub is shared across all packages. This means that if a module is using the "_" sub, then there is a conflict and you should not use this plugin. For example, Jifty uses the "_" sub for localization. Jifty is the only known user. SEE ALSO
"Devel::REPL", "Devel::REPL::Plugin::History" AUTHOR
Shawn M Moore, "<sartak at gmail dot com>" COPYRIGHT AND LICENSE
Copyright (C) 2007 by Shawn M Moore 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-08 Devel::REPL::Plugin::OutputCache(3pm)
All times are GMT -4. The time now is 10:28 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy