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
Locale::Script(3perl)					 Perl Programmers Reference Guide				     Locale::Script(3perl)

NAME
Locale::Script - standard codes for script identification SYNOPSIS
use Locale::Script; $script = code2script('phnx'); # 'Phoenician' $code = script2code('Phoenician'); # 'Phnx' $code = script2code('Phoenician', LOCALE_CODE_NUMERIC); # 115 @codes = all_script_codes(); @scripts = all_script_names(); DESCRIPTION
The "Locale::Script" module provides access to standards codes used for identifying scripts, such as those defined in ISO 15924. Most of the routines take an optional additional argument which specifies the code set to use. If not specified, the default ISO 15924 four-letter codes will be used. SUPPORTED CODE SETS
There are several different code sets you can use for identifying scripts. The ones currently supported are: alpha This is a set of four-letter (capitalized) codes from ISO 15924 such as 'Phnx' for Phoenician. This code set is identified with the symbol "LOCALE_SCRIPT_ALPHA". The Zxxx, Zyyy, and Zzzz codes are not used. This is the default code set. numeric This is a set of three-digit numeric codes from ISO 15924 such as 115 for Phoenician. This code set is identified with the symbol "LOCALE_SCRIPT_NUMERIC". ROUTINES
code2script ( CODE [,CODESET] ) script2code ( NAME [,CODESET] ) script_code2code ( CODE ,CODESET ,CODESET2 ) all_script_codes ( [CODESET] ) all_script_names ( [CODESET] ) Locale::Script::rename_script ( CODE ,NEW_NAME [,CODESET] ) Locale::Script::add_script ( CODE ,NAME [,CODESET] ) Locale::Script::delete_script ( CODE [,CODESET] ) Locale::Script::add_script_alias ( NAME ,NEW_NAME ) Locale::Script::delete_script_alias ( NAME ) Locale::Script::rename_script_code ( CODE ,NEW_CODE [,CODESET] ) Locale::Script::add_script_code_alias ( CODE ,NEW_CODE [,CODESET] ) Locale::Script::delete_script_code_alias ( CODE [,CODESET] ) These routines are all documented in the Locale::Codes man page. SEE ALSO
Locale::Codes Locale::Constants http://www.unicode.org/iso15924/ Home page for ISO 15924. AUTHOR
See Locale::Codes for full author history. Currently maintained by Sullivan Beck (sbeck@cpan.org). COPYRIGHT
Copyright (c) 1997-2001 Canon Research Centre Europe (CRE). Copyright (c) 2001-2010 Neil Bowers Copyright (c) 2010-2011 Sullivan Beck This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. perl v5.14.2 2011-09-26 Locale::Script(3perl)
All times are GMT -4. The time now is 09:35 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy