Skip to main content

LAMP / LEMP development note 30-Sept-2019

Count Apache's (httpd) concurrent connections
https://www.2daygeek.com/linux-check-apache-concurrent-connections-netstat-ss-command/


$htpasswd -b -c ~/temp/password admin test101

https://www.networkworld.com/article/2874387/mission-impossible-memorizing-ipv6-addresses.html

 Chrome & Firfox Dark mode seem cool.

https://stackoverflow.com/questions/19646567/is-there-a-way-to-get-client-connections-count-in-aws-elb

ELB actually runs on EC2 (?), which would only make sense, and would explain why it can't scale up extremely rapidly in response to traffic spikes.

YOU CAN’T PROTECT WHAT YOU CAN’T SEE
https://medium.com/tenable-techblog/lessons-from-aws-nlb-timeouts-5028a8f65dda

https://stackoverflow.com/questions/6375654/how-to-add-date-string-to-each-line-of-a-continuously-written-log-file

Difference between ESTABLISHED and LISTENING
https://askubuntu.com/questions/854354/difference-between-established-and-listening
https://users.cs.northwestern.edu/~agupta/cs340/project2/TCPIP_State_Transition_Diagram.pdf


 Ton of document ab Linux bash
 https://ocaml.github.io/ocamlunix/pipes.html

https://ocaml.github.io/ocamlunix/ocamlunix.html

 https://ocaml.github.io/ocamlunix/ocamlunix.pdf

 https://github.com/ocaml/ocamlunix/

 $ date -Iseconds
2016-09-09T12:18:23+0200

 awk -v var="$TIMESTAMP"

Queue
 https://stackoverflow.com/questions/18396452/design-a-datastructure-to-return-the-number-of-connections-to-a-web-server-in-la

htdigest [ -c ] passwdfile realm username

https://stackoverflow.com/questions/600079/how-do-i-clone-a-subdirectory-only-of-a-git-repository

http://www.andymboyle.com/2011/11/02/quick-csv-to-json-parser-in-python/
https://www.codementor.io/garethdwyer/flask-vs-django-why-flask-might-be-better-4xs7mdf8v

https://stackoverflow.com/questions/419163/what-does-if-name-main-do

http://www.andymboyle.com/2011/11/02/quick-csv-to-json-parser-in-python/

https://realpython.com/python-testing/

Damn encoding

function w1250_to_utf8($text) {
    // map based on:
    // http://konfiguracja.c0.pl/iso02vscp1250en.html
    // http://konfiguracja.c0.pl/webpl/index_en.html#examp
    // http://www.htmlentities.com/html/entities/
    $map = array(
        chr(0x8A) => chr(0xA9),
        chr(0x8C) => chr(0xA6),
        chr(0x8D) => chr(0xAB),
        chr(0x8E) => chr(0xAE),
        chr(0x8F) => chr(0xAC),
        chr(0x9C) => chr(0xB6),
        chr(0x9D) => chr(0xBB),
        chr(0xA1) => chr(0xB7),
        chr(0xA5) => chr(0xA1),
        chr(0xBC) => chr(0xA5),
        chr(0x9F) => chr(0xBC),
        chr(0xB9) => chr(0xB1),
        chr(0x9A) => chr(0xB9),
        chr(0xBE) => chr(0xB5),
        chr(0x9E) => chr(0xBE),
        chr(0x80) => '€',
        chr(0x82) => '‚',
        chr(0x84) => '„',
        chr(0x85) => '…',
        chr(0x86) => '†',
        chr(0x87) => '‡',
        chr(0x89) => '‰',
        chr(0x8B) => '‹',
        chr(0x91) => '‘',
        chr(0x92) => '’',
        chr(0x93) => '“',
        chr(0x94) => '”',
        chr(0x95) => '•',
        chr(0x96) => '–',
        chr(0x97) => '—',
        chr(0x99) => '™',
        chr(0x9B) => '’',
        chr(0xA6) => '¦',
        chr(0xA9) => '©',
        chr(0xAB) => '«',
        chr(0xAE) => '®',
        chr(0xB1) => '±',
        chr(0xB5) => 'µ',
        chr(0xB6) => '¶',
        chr(0xB7) => '·',
        chr(0xBB) => '»',
    );
    return html_entity_decode(mb_convert_encoding(strtr($text, $map), 'UTF-8', 'ISO-8859-2'), ENT_QUOTES, 'UTF-8');
}
https://www.php.net/manual/en/function.mb-convert-encoding.php


https://smallbusiness.chron.com/microsoft-excel-wont-show-japanese-characters-77317.html

https://www.php.net/manual/en/language.operators.errorcontrol.php
Is there any equivalent in Python ?

https://stackoverflow.com/questions/1088387/what-specific-productivity-gains-do-vim-emacs-provide-over-gui-text-editors
https://stackoverflow.com/questions/14132003/is-emacs-worth-learning

https://github.com/jazzband/django-pipeline/issues/602
https://stackoverflow.com/questions/17353213/init-for-unittest-testcase
https://stackoverflow.com/questions/16870663/how-do-i-validate-a-date-string-format-in-python

https://stackoverflow.com/questions/3501382/checking-whether-a-variable-is-an-integer-or-not

Testing IP based access
To test multiple IP access, for example for IP connection count, order, we can:
- Use PC + mobile (with Mobile 3G/4G/5G) to test
- PC + mobile (with VPN like Orbot)
- PC with VPN + mobile Wifi (same network)
- A PC + a VPS server  (can be temporary created or permanent one, delete after test if not needed)


https://mortada.net/can-integer-operations-overflow-in-python.html
https://stackoverflow.com/questions/2484156/is-str-replace-replace-ad-nauseam-a-standard-idiom-in-python
https://stackoverflow.com/questions/9573244/how-to-check-if-the-string-is-empty
https://stackoverflow.com/questions/21388541/how-do-you-check-in-python-whether-a-string-contains-only-numbers

https://stackoverflow.com/questions/38398018/ip-address-and-command-logs-for-git-clone-pull-and-push

Comments

Popular posts from this blog

Rand mm 10

https://stackoverflow.com/questions/2447791/define-vs-const Oh const vs define, many time I got unexpected interview question. As this one, I do not know much or try to study this. My work flow, and I believe of many programmer is that search topic only when we have task or job to tackle. We ignore many 'basic', 'fundamental' documents, RTFM is boring. So I think it is a trade off between the two way of study language. And I think there are a bridge or balanced way to extract both advantage of two method. There are some huge issue with programmer like me that prevent we master some technique that take only little time if doing properly. For example, some Red Hat certificate program, lesson, course that I have learned during Collage gave our exceptional useful when it cover almost all topic while working with Linux. I remember it called something like RHEL (RedHat Enterprise Linux) Certificate... I think there are many tons of documents, guide n books about Linux bu

Martin Fowler - Software Architecture - Making Architecture matter

  https://martinfowler.com/architecture/ One can appreciate the point of this presentation when one's sense of code smell is trained, functional and utilized. Those controlling the budget as well as developer leads should understand the design stamina hypothesis, so that the appropriate focus and priority is given to internal quality - otherwise pay a high price soon. Andrew Farrell 8 months ago I love that he was able to give an important lesson on the “How?” of software architecture at the very end: delegate decisions to those with the time to focus on them. Very nice and straight-forward talk about the value of software architecture For me, architecture is the distribution of complexity in a system. And also, how subsystems communicate with each other. A battle between craftmanship and the economics and economics always win... https://hackernoon.com/applying-clean-architecture-on-web-application-with-modular-pattern-7b11f1b89011 1. Independent of Frameworks 2. Testable 3. Indepe