I just can't control my hands

Some recent tossing insights.

Personal blog things

In fact, I started the construction of personal blog website from a very early time, which initially benefited from GitHub Opening of IO domain names. In general, the history of building my blog is mainly divided into three stages.

Phase I

The first stage belongs to simplicity supremacy. Used in this period Jekyll As the main static blog generation engine, you can easily use Markdown to write, and this is also officially supported by Github Pages.

At first, a simple template was used. Later, with the increasing demand, such as labels, directories, sidebars and other functions, it switched to another topic.

Phase II

Due to the contradiction between the increasing customization demand and the restriction of static blog in the first stage, this period began a tossing process of building wheels. At this stage, I wrote a complete blog system in Python (Django), named berserk (because I liked to listen to Eminem at that time). The blog supports the following functions:

  • Support Markdown rendering, article directory, code syntax highlighting and adaptive article layout
  • Support article classification, labels, and database management of these attributes
  • Support page access statistics and comments
  • Support background management (based on customized Django admin)
  • Support the use of VIM like keyboard mapping in the background to write articles
  • Support the hiding of real background management pages and honeypots and alarms of false background pages (yes)

In addition, because I was exposed to some trendy front-end concepts at that time, I also tried to integrate a set of front and rear end separation mode into the system. After learning ReactJS and tossing around for some time, I found that it was incompatible with Django's original template system, and then removed it.

This blog system has been patched and used for a long time, full of all kinds of strange front and rear tricks. During this period, I also encountered various problems, such as being advertised in the comment area by Ukrainian robots all day, so I joined the man-machine verification, and so on Until one day I found that all this seemed to have nothing to do with my original intention (blogging), so I missed the happy time when I used to use Jekyll.

Phase III

After the front and back ends of the self built blog were badly damaged, I returned to Jekyll's arms. In fact, I saw many excellent Jekyll themes during the self built blog, which can fully meet my requirements, so I finally returned. And secretly made up his mind: no more tossing.

However, after a little toss, I made some simple customization and Optimization for a niche theme during this period. This stage is a return to nature, without the back-end chores, you can simply modify the theme template. Based on the understanding of Jekyll template, these things are familiar. It can be said that the tossing of blog pages has come to an end.

The system has also been used for a long time, and everything is very satisfactory, except for a few dark clouds overhead:

  1. Blog access statistics use Non operator , the server is abroad and the data is uncontrollable;
  2. Web pages are loaded synchronously. When there are many resources such as pictures, the speed will be very slow;
  3. Jekyll uses Ruby, which is cumbersome to install and extremely slow to build;
  4. ...

The dependency problem of point 3 can be solved through bundle or directly using docker, but the speed of compilation and construction is really worrying. For example, it takes up to 15 seconds to build on the server with only dozens of articles:

$ docker run -it --rm -v $PWD:/srv/jekyll -p 4000:4000 jekyll/jekyll jekyll serve -s /srv/jekyll
ruby 2.6.5p114 (2019-10-01 revision 67812) [x86_64-linux-musl]
Configuration file: /srv/jekyll/_config.yml
            Source: /srv/jekyll
       Destination: /srv/jekyll/_site
 Incremental build: disabled. Enable with --incremental
      Generating...
                    done in 15.28 seconds.
 Auto-regeneration: enabled for '/srv/jekyll'
    Server address: http://0.0.0.0:4000/
  Server running... press ctrl-c to stop.

So, I began to toss again But this time I didn't forget my original intention, but chose Hugo Add a more active topic, because I don't want to spend time on the front-end modification, and I don't want to spend too much time studying the new template syntax (but I finally mentioned it) pull request).

Anyway, I moved from Jekyll to Hugo. The migration process is not very smooth, because they have different understanding of Markdown metadata, and the path of the whole station is also different, but it can be realized by writing a migration script.

New blogs can be accessed directly through https://evilpan.com visit.

Perception

In fact, changing over and over will not have much impact on the final reader (if any). Personally, I don't like those fancy blog themes, such as making some cool canvas in the background and turning the computer fan straight. From the reader's point of view, (blog) websites only need to:

  1. Good reading experience, including font, picture and color. Don't make some non human color matching of green background and yellow characters;
  2. If the article is long, it is best to have a directory for easy reading;
  3. For the persistence of links, don't let readers index it in Baidu or other places and find it is 404;
  4. RSS (of course, it can not be provided. People who need it can use crawlers such as feed43, but it's not necessary);

These general blog engines can meet, and there is really no need to toss around. For the blog itself, in fact, the most important thing is only one - article quality! Everything else is bullshit. If so Content farm That's another matter.

About credit

Many people are used to removing the credit at the bottom when building their own blog, such as Power by Hugo / Theme By XXX. I used to do the same. On the one hand, I wanted to be concise. On the other hand, I also wanted to have some "personality" for fear that the theme of the treasure would be copied by others and lead to rotten streets; Or simply want others to think it was written by themselves.

In fact, it's not necessary. First of all, you are not a front-end engineer, so front-end skills are not what others want to learn from you. Conversely, if you are the front end, writing a set of topics yourself should also be a routine operation. Opportunism can't benefit you; Secondly, it's a good thing to leave theme information for more people to use. After getting more attention, you may potentially introduce more open source contributions, which will eventually enable you to get a better use experience; Finally, credit is a minimum respect for the original author's labor achievements. No one wants to abuse what he has worked hard to develop or write.

When reading many foreign slides or articles, I often see that if the pictures and screenshots are not drawn by myself, they will clearly explain the source. In China, they are often used. Of course, I am the same, but I have been changing.

About time

When I was young, I liked to do addition and pursued the principle that art is more than pressure. I like to explore and learn in various fields. Now I still have a lot of impulses. However, as the task list grows, many items in it are likely to sleep in favorites all the time. At a certain stage, you need to learn to control your hands and use your time on the blade. In other words, we need to learn to subtract from life.

In addition to the blog system mentioned above, I have also done a lot of time wasting things, such as writing XSS blind injection background, DNS server (SSRF), GPS phishing system, and writing various command-line tools to realize the functions that can be achieved on the web page

Various command-line tools, including word search:

$ dictionary.py restrain
##########################
### Youdao Translation ###
##########################
restrain: inhibition
us:[rɪˈstreɪn], uk:[rɪˈstreɪn]
=== basic ===
vt. Inhibit, control; Constraints; check
=== web ===
restrain: prevent,inhibition,limit
Ratio restrain: Ratio braking
restrain test: Bolt test
$ abbr.py PUA
[+] found 25 results
+------+----------------------------------------+-----------------------------------+------+
| name |                  desc                  |               domain              | rate |
+------+----------------------------------------+-----------------------------------+------+
| PUA  |    Pandemic Unemployment Assistance    |    Miscellaneous / Unclassified   |  5   |
| PUA  |   Potentially Unwanted Applications    |    Miscellaneous / Unclassified   |  4   |
| PUA  |    Potentially Unwanted Application    |        Computing / Software       |  4   |
| PUA  |             Pick Up Artist             |    Community / Performing Arts    |  3   |
| PUA  |            Public Use Area             |    Miscellaneous / Unclassified   |  2   |
| PUA  |         Puas, Papua New Guinea         |      Regional / Airport Codes     |  2   |
| PUA  |            Private Use Area            |             Community             |  2   |
| PUA  |          Personal User Agent           |    Miscellaneous / Unclassified   |  2   |
| PUA  | Professional Underwriters Agency, Inc. |    Business / Companies & Firms   |  1   |
| PUA  |    Professional Underwriters Agency    |        Business / Agencies        |  1   |
| PUA  |           Present under Arms           |    Miscellaneous / Unclassified   |  1   |
| PUA  |       Premium Upgrade Assurance        |    Miscellaneous / Unclassified   |  1   |
| PUA  |    Potentialy Unwanted Application     |    Miscellaneous / Unclassified   |  1   |
| PUA  |       Potentially Unwanted Apps        |    Miscellaneous / Unclassified   |  1   |
| PUA  |      Possession and Use Agreement      |    Miscellaneous / Unclassified   |  1   |
| PUA  |      Portland Urologic Associates      |    Business / Companies & Firms   |  1   |
| PUA  |            Plasma Uric Acid            |   Academic & Science / Chemistry  |  1   |
| PUA  |            Pick Up Artists             |          Community / Art          |  1   |
| PUA  |    Pharos University in Alexandria     | Academic & Science / Universities |  1   |
| PUA  |   Peoples University of the Americas   | Academic & Science / Universities |  1   |
| PUA  |      Pediatric Urology Associates      |        Medical / Pediatric        |  1   |
| PUA  |     Payment Undertaking Agreement      |    Miscellaneous / Unclassified   |  1   |
| PUA  |  Partido de Unificación Anticomunista  |     International / Guatemalan    |  1   |
| PUA  |           Paid Up Additions            |    Miscellaneous / Unclassified   |  1   |
| PUA  | Paul University, Awka - Anambra State  |         Academic & Science        |  0   |
+------+----------------------------------------+-----------------------------------+------+

Where there is stock search:

Check the IP address:

$ iplocate.py --on 1.1.1.1
>>>>>> results for 1.1.1.1 <<<<<<
[*] GeoLite : Australia(AU) - None
[*] Kn0007  : CLOUDFLARE.COMCLOUDFLARE.COM
[*] DBIP    : OC(Oceania),AU(Australia) New South Wales, Sydney
[*] Tencent : Australia code(-1) lnglat(149.1333,-35.2667)
[*] IPIP    : ["CLOUDFLARE.COM","","","",""]

More complicated are agent pool management tools, bookmark management tools and so on:

Some gadgets are done by dividing three by five, but some take quite a while. To say whether it is necessary, in fact, many are not necessary. If you want to drive, you don't need to make your own wheels. The process of prototype development is still very interesting, but many of them are cool after they are finished, and then they haven't been used for a long time.

In order to avoid the embarrassment of doing useless work, it is important to manage your ideas well. For ideas that appear from time to time, you can first record them, and then sort them at the weekend or a fixed time to evaluate what can be done, what needs to be done, and what can be done with the help of existing wheels. Stand on the shoulders of giants instead of blindly pursuing the pleasure of writing code.

The idea was * * "because I can do it, I'll do it" * *, but the important thing is to manage my energy and time. Learning is the same. Various new concepts emerge in endlessly. Before starting learning, you need to evaluate whether this is what you need, rather than invest in it because it looks popular.

Be curious , but don't get drown.

About white whoring

When migrating the blog, I found that the new version of Chrome refused to load all HTTP resources in the HTTPS site, resulting in the previous pictures on qiniu CDN can not be displayed, and qiniu's HTTPS traffic is charged, so I decided to change a picture bed. In order to find a new HTTPS free drawing bed, I searched many records and found that many free sites have been inaccessible. Finally, I chose to use the image upload function of a blog platform. In order to upload in batch, I also analyzed the signature verification and encryption algorithm of the platform.

Although the final goal was achieved, I also spent most of the day. All are caused by the traditional thought of white whoring, because I used to be free from childhood. Free chat tools, free games, free operating system, free anti-virus software,... This is totally unreasonable. If a thing is done well, but it doesn't make money at all, will developers still invest so much energy in maintenance? I am passionate about the work of open source, and I have to face all kinds of challenges from Xiaobai and the urging of the party. I can only experience it.

It makes sense for us to spend hundreds of dollars on a meal, but we hesitate to spend tens of dollars on online services or software. But in the final analysis, white whoring is not a long-term plan after all. A free CDN needs to be limited in terms of traffic and speed. A free cloud server will not provide availability guarantee. A free drawing bed may hang up as soon as possible. It's very kind to tell you before going offline.

White whoring online services need to bear their own stability and migration risks. White whoring local applications need to endure advertising and push. There is no free lunch in the world. If God can give me another chance, I want to say:

It's interesting to see a news article recently. Wechat has launched functions such as taking a look and small videos, not because of users' needs, but because of the encroachment of headlines on users' time - users' time spent on wechat every day has decreased from X hours to Y hours, while the time invested in headline products has increased from M hours to N hours. For the first time, I had a different understanding of "time is money".

You think you made money by whoring for nothing. In fact, you were the last one to be whored.

Tags: Python Go Django html5 React

Posted by ngu_tri on Mon, 16 May 2022 15:58:17 +0300