It's not the power that people hate, but the power they don't have.

With the results of the college entrance examination coming down, I may not be able to go to the school that I really want to go to. So I complain about the society. Why do we all agree with 985 / 211, but not double non?

In fact, it's not an attempt to find out the school's own discrimination when it comes to the admission of last year?

With the name of the key school, ha, how powerful I am. When I look down on each other, have I ever thought that I will become the "despised" side?

Therefore, people should learn to meet the strong, to face the weak, and to keep awe.

This is also a profound lesson that the college entrance examination has brought to me.

Humanities and social sciences are actually quite important, not only reflected in the achievements, but also reflected in people's cultural accomplishment.

Every time I think of some headache things, I always think, if I read more books, will my mind be a little better now?

CDN is a kind of multicast

Before I came into contact with the concept of multicast, I had been thinking about why such a beautiful thing could not be used on the Internet. Later, I thought about it. Now, CDN has been saying that it can achieve this goal. It can reduce the transmission of duplicate data on the backbone network and copy it into multiple copies at the near user end.

Seeing this speech of Tencent cloud today also confirms this view: Tencent cloud pcdn: from P2P to Internet Framework

In addition, P2P is really a very interesting thing. It's fun to fight people~

Never let someone else's misfortune sink in because you can't make sure that you won't encounter it yourself.

What is Web 2.0?

The essence of web is a tool to transmit information. Web has the method of transmitting information HTTP, and web has the method of representing information HTML. What is the particularity of Web 2.0?

In my understanding, Web 2.0 isolates how information is delivered and how it is expressed from the user's use, that is, in Web 2.0 In the era, users do not need to consider how to make a beautiful web page, how to put their information on the Internet all the time, and how to embed their own video works with flash. All they need to do is write a text or upload some videos. The rest of the content is handled by the computer city.

Web 2.0 makes the division of labor of the Internet more detailed, the beautiful design of the interface is handled by professional designers, the preservation of information has special operation and maintenance to deal with, and programmers are required to solve various difficult problems.

Web 2.0 is actually the Internet extension of the concept of application.

The characteristics of Web 2.0 have led to the completion of the above-mentioned matters and the shameless product "Rampart" strategy of some decision-makers, leading to the centralization of the Internet, from the Internet to the Internet tree, making the user's information a cash cow for some companies, and making the dissemination of control information [censered].

Separate the program from the data! Get rid of centralized nodes that don't really need to exist! Return the Internet to a free and open world!

#Hashtag ~ ~ embrace ~~

What is a mailing list?

This is an answer to the question of Zhihu, What is a mailing list?

Simply put, it is a collection of recipients, which can be represented as an email address to which you send mail, which will help you forward to other users. One to many is essentially sending letters.

Compared with CC and CC, each recipient needs to be written to the email header. This list can be dynamically changed. New recipients can tell the mailing list that they are willing to receive the mail sent to the mailing list through the web page or other means, and they can also quit.

For example, QQ should not be used as a service provider's e-mail list.

Mailing lists can be used for message subscription and community. The specific example is that the various promotional messages you receive can be regarded as a mailing list to some extent. In addition, foreign large open source communities generally use mailing lists as their communication tools.

Compared with BBS and other online forums, mailing list is more troublesome, real-time is not high (minute level, compared with the second level of IM instant messaging), learning cost is relatively high, and because of its decentralized characteristics (everyone can be used as a mailing list), it is difficult to review (not no, mailing list is not a safe information exchange tool for review), so it has not been promoted in China Kailai (the number of public mailing list service providers in China is poor).

In fact, the mailing list is quite valuable. It does not bind to any platform, which means that as long as you have a mail service account with a certain reputation, you can build a group with people from any service provider anywhere in the world. QQ is not like wechat group. In addition, people will tend to use the formal style a little more efficiently.

Use opendmasq

Sometimes, we may want to block a website (e.g. screening Xiaomi ads), or set up a resolution for a specific website (for example, test your website locally before publishing it). Openwrt provides a parsing tool dnsmasq which is much more powerful than local host. Compared with local host, openwrt supports generic configuration and can resolve special types of records.

In fact, there is no need to fix the location of adluciblock on the web.

 #Set the domain name a of to "UCI add"_ The domain name of "address. COM / XAM. COM / XAM]_ List DHCP. @ dnsmasq [0]. Address: / / ad.mi. COM / ", effective configuration (write to / etc / config / DHCP) 
 UCI commit DHCP # restart service 
 service dnsmasq restart


Mojang is releasing bedrock_ The PDB debug symbol file is attached to the server.

The point is that the document is quite large. The whole terminal is 100MB, and the debugging file is 60MB.

However, it seems that mojang did this on purpose. Minecraft is a commercial software and can't send source code. However, minecraft needs the community to make plug-ins, and mojang is too lazy to do API.

Then I'll give you debug files, you decompile it yourself.

Plan pass!

Minecraft dragon server universal market plug-in step hole record and repair Chinese version download

The original minecraft is tired of it (the dragon finally fought) I want to play with the industrial mod 2. I've been thinking about the MCS for a long time, but I haven't been able to find it. It's too lonely to play by yourself, so let's build a suit. This is the preface. I don't want to talk about the details. In short, there are a lot of pitfalls. Fortunately, there are some tutorials from our predecessors (for example, http: / / www.mcbbs. Net / thread-786074-1-1. HTML), and the road is quite smooth. In the spirit of serving the people, select a pit here and summarize the process to help later partners.

brief introduction

The universal market is a consignment market with a box like interface.

Mcbbs Reprint:
GitHub original project:


Update 20190628: fixed the problem that hot loading doesn't work, and fixed the bug of adding air to the market with empty hands

UniversalMarket-1.12.2-v1.3-Bug_ fix_ and_ chinese_ translation_ by_ yys_ and_ Tollainmear_ and_ lookas2001.jar

UniversalMarket-master-Bug_ fix_ and_ chinese_ translation-source.7z

Since various prompt texts of this project are built into the code, the Sinicization needs to be recompiled. There are project source code files on it. If you are worried, you can manually compile according to the compilation process below. The Chinese part adopts the translation provided by tollainmear.

There is a problem After installing the universal market plug-in version 1.3 (HTTPS: / / GitHub. COM / xwaffle1 / universalmarket / releases / tag / 1.3), it is found that you cannot enter the store normally. The console error is as follows:

 [xx:xx:xx] [Server thread/ERROR] [Sponge]: Error occurred while executing command 'um' for source EntityPlayerMP['lookas2001'/248, l='world', x=302.00, y=64.00,  z=229.00]: There's no NBT Data set in the provided container There's no NBT Data set in the provided container
    at net.minecraft.item.ItemStack.setRawData( ~[aip.class:?]
    at com.xwaffle.universalmarket.utils.ItemBuilder.<init>(  ~[ItemBuilder.class:?]
    at com.xwaffle.universalmarket.utils.ItemBuilder.<init>( ~[ItemBuilder.class:?]
    at ~[Market.class:?]
    at ~[Market.class:?]
    at  com.xwaffle.universalmarket.commands.MarketCommand.process( ~[MarketCommand.class:?]
    at org.spongepowered.api.command.dispatcher.SimpleDispatcher.process( ~[SimpleDispatcher.class:1.12.2-2825-7.1.6]
    at  org.spongepowered.common.command.SpongeCommandManager.process( [SpongeCommandManager.class:1.12.2-2825-7.1.6]
    at net.minecraft.command.ServerCommandManager.func_ 71556_ a(SourceFile:1156) [dh.class:?]
    at 147361_ d( [pa.class:?]
    at 147354_ a( [pa.class:?]
    at 148833_ a(SourceFile:37) [la.class:?]
    at 148833_ a(SourceFile:9) [la.class:?]
    at org.spongepowered.common.event.tracking.phase.packet.PacketPhaseUtil.onProcessPacket( [PacketPhaseUtil.class:1.12.2-2825-7.1.6]
    at$1.redirect$onProcessPacket$zlk000(SourceFile:539) [hv$1.class:?]
    at$ [hv$1.class:?]
    at java.util.concurrent.Executors$ [?:1.8.0_ 74]
    at [?:1.8.0_ 74]
    at net.minecraft.util.Util.func_ 181617_ a(SourceFile:46) [h.class:?]
    at org.spongepowered.common.SpongeImplHooks.onUtilRunTask( [SpongeImplHooks.class:1.12.2-2825-7.1.6]
    at net.minecraft.server.MinecraftServer.redirect$onRun$zjo000( [MinecraftServer.class:?]
    at net.minecraft.server.MinecraftServer.func_ 71190_ q( [MinecraftServer.class:?]
    at net.minecraft.server.dedicated.DedicatedServer.func_ 71190_ q( [nz.class:?]
    at net.minecraft.server.MinecraftServer.func_ 71217_ p( [MinecraftServer.class:?]
    at [MinecraftServer.class:?]
    at [?:1.8.0_ 74]

At this time, I was a little flustered, because I had no systematic contact with Java before. I only had a little understanding when studying the authorization and verification of Ruijie network ess / SMP products and Moegirl android app.

Positioning and resolution

Go to search engine directly, didn't find

Because this project is open source (open source is great!) We can download the code and study it slowly.

Later, I went to the original project to find the issue, and found this I contacted Dalao alone, who had already patched the previous version of jar, through some ways. I would like to thank his work for enlightening me when I had no idea.

Fortunately, with trace, we can see that the last error about this plug-in occurred in com.xwaffle.universalmarket.utils.ItemBuilder.<init>( ~[ItemBuilder.class:?] here:

We throw the setraw data function on the sponge forum and search for and find that this function is related to setting some attributes on items, which is a relatively Hacky approach.

Search the function corresponding to this code in the global project:

Find that this code is only related to the file. Open it and find the calling place.

We find that the call point with unsafetedamage (damage value) is actually passed in through the meta variable, which is only here:

After the plug-in is loaded, the payment button is OK.

Therefore, it is speculated that this may be a function related to the progress bar that the author wants to do, but in the end, for various reasons, it finally coos (human nature).

Remove this line and the two related lines (the top two lines of the bug line) and try it.

Roadblock -- compiler

Minecraft uses Java 8 as its running environment. Correspondingly, mod development around minecraft is based on Java 8. It is recommended to use Java 8 for the following work.

My local computer is MacBook, and the development environment is MacOS. Compared with Windows system, it is more powerful on the command line and has more supporting facilities. Personal development, usually use brew as a package management, installation software fast and fast. But brew doesn't provide Java 8 by default However, it is impossible to download from the official website of Oracle (the download still needs to log in). There is such an answer on stackoverflow, which solves the problem of Java 8 installation.

See that this project uses gradle as its dependency management (or build tool?) According to my previous experience with composer and NPM, I think I need to install it with brew. In fact, it is unnecessary, but it is unnecessary to install it. The gradle version on brew is too high, and the project itself provides a package management command, gradlew. Running it will generate the corresponding files in the project directory and user directory.

so ./gradlew Now, after downloading the necessary files, I give a prompt that I should run ./gradlew tasks Run it and find the option that seems to be a build ./gradlew build Run it, silly eye, prompt error:

 Java / market. Java / market. Import. Java / market. Import. Java / market. Java / market; / XXXXXX / universalmarket master / build / sources / main / Java / COM / xwaffle / universalmarket / market / market. Java: 31: error: package org.spongeowned.common.item.inventory.query.operation does not exist 
 import org.spongepowered.common.item.inventory.query.operation.InventoryPropertyQueryOperation; / XXXXXX / universalmarket master / build / sources / main / Java / COM / xwaffle / universalmarket / market / market. Java: 32: error: package org.spongeowned.common.item.inventory.util does not exist 
 import org.spongeowned.common.item.inventory.util.itemstackutil;; ^/ XXXXXX / universalmarket master / build / sources / main / Java / COM / xwaffle / universalmarket / market / marketitem. Java: 10: error: package org.spongeowned.common.item.inventory.util does not exist 
 import org.spongeowned.common.item.inventory.util.itemstackutil; / XXXXXX / universalmarket master / build / sources / main / Java / COM / xwaffle / universalmarket / utils / itembuilder. Java: 11: error: package org.spongeowned.common.item.inventory.util does not exist 
 import org.spongeowned.common.item.inventory.util.itemstackutil;; ^Note: writing plugin metadata to file / file / XXXXXX / universalmarket-master / build / classes / main / has 5 errors, compile Java failed, build failed with an exception, build failed with an exception, what what went wrong wrong is: execution failed for task ': compilejava', > compilation failed; see the compiler error output output for details. 
, compile failed; see the compiler error error output for details. 
 * what went wrong wrong wrong wrong error output for details. 
 * what went wrong wrong wrong wrong output for details. 
 * what went wrong wrong wrong wrong output output for details. 

 * what what went wrong wrong doing wrong output for tasks': compile Java '; > compilation failed; see the compiler error error output output for details. 
 * try: 
 run with -- stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.


Looking through the sponge document, I can see that the examples given by the government are all based on ide. However, due to the lack of space in my MacBook, I finally installed IntelliJ idea community on another computer (Windows), and then used the build button provided by IDE, which took a long time to download. Finally, two errors "PKIX path building failed" and However, the above command "MacBook to request" will not appear in my view.

In the previous step, I observed one thing: why other introductions don't have problems, but these introductions do. I found that these packages start with I have checked the build. Gradle file before, and it has been approved compile 'org.spongepowered:spongeapi:7.0.0' Introducing spongeapi. After troubleshooting the IDE, I decided to see what the java compiler was introducing.

Because of my previous experience with gradle, I knew that gradle would generate folders in the user directory ~/.gradle Go to it and search for it find . | grep sponge One of the search results ./caches/modules-2/files-2.1/org.spongepowered/spongeapi/7.0.0/ada1f9981de3459b182ee16d6408173ef33a8943/spongeapi-7.0.0.jar This is the package corresponding to the API.

Decompress it (no need to decompile it)

It's autistic

Where is common!!

Go back to build. Gradle and look down, compile files('libs/spongeforge-1.12.2-2555-7.1.0-BETA-2837.jar') In combination with the description of the spongeharmony project, the author TM directly regards the release version of spongeforge as a dependency! And the source code also deleted this directory!!! From the point of view of using the side door API, the author of the plug-in is not recommended to bypass the behaviors such as spine, which is directly introduced by the plug-in author net.minecraft.nbt.NBTTagCompound )It's no wonder that the author didn't post some of the API on the mode.

Download the latest stable version of spongeforge (spongeforge-1.12.2-2825-7.1.6. Jar) (the old one doesn't want to turn back), create LIBS directory and throw it in. Change the file name in gradle. Run it again ./gradlew build

Baby, I finally see you

Finally, after testing, the work is perfect.

Sharing files through WebDAV on openwrt

All rights reserved by lookas2001. This work is licensed under the Creative Commons Attribution 4.0 international license agreement. Please indicate the author and source when reprinting.

Openwrt /, a powerful software package, can be installed through openwrt. WebDAV (http: / / www.webdav. Org /) is an extension of HTTP that can be used to share files. Therefore, we can try to install the corresponding software package on openwrt to make the device support WebDAV.

Compared with SMB and AFP, the speed of WebDAV is superior in actual test. This may be due to the fact that WebDAV is based on HTTP, and there may be some black technologies on the HTTP server to improve the speed while reducing the occupancy (or the reason that WebDAV in the next step is based on HTTP instead of HTTPS).

In addition, the reason for writing this article is that SMB and AFP already have relatively complete tutorials. For example, these two articles are configuration However, WebDAV is lack of documentation.

Lighttpd (HTTPS: / / www.lighttpd. Net /) is a lightweight but relatively complete HTTP server. It is observed that it provides WebDAV mod, so it can be used to implement WebDAV server.

Install lighttpd and WebDAV auth module

before opkg update To update the local software package.

adopt opkg install lighttpd lighttpd-mod-webdav lighttpd-mod-auth lighttpd-mod-authn_ file The package can be loaded with the same key.

If the download speed is slow or the download is difficult, you can manually download the corresponding package from and install it, or set up a network agent (this is not within the scope of this article, you need to find a way to do it yourself).

Configure lighttpd

Unlike SMB, which provides UCI unified configuration interface, lighttpd needs to be modified under / etc / lighttpd.

adopt vi /etc/lighttpd/lighttpd.conf Open the main configuration file for lighttpd.

Can be passed through cp /etc/lighttpd/lighttpd.conf /etc/lighttpd/lighttpd.conf.bak Set up a backup to facilitate restore in case of configuration errors.

This is a configuration file:

 server.document-root        = "/mnt"
server.upload-dirs          = ( "/tmp" )
server.errorlog             = "/var/log/lighttpd/error.log"             = "/var/run/"
server.username             = "http"
server.groupname            = "www-data"

index-file.names            = ( "index.php", "index.html",
                                 "index.htm", "default.htm",

static-file.exclude-extensions = ( ".php", ".pl",  ".fcgi" )

### Options that are useful but not always necessary:
#server.chroot               = "/"
server.port                 = 81
#server.bind                 = "localhost"
#server.tag                  = "lighttpd"
server.errorlog-use-syslog  = "enable"      = "writev"

### Use IPv6 if available
#include_ shell "/usr/share/lighttpd/"

dir-listing.encoding        = "utf-8"
server.dir-listing          = "enable"

include "/etc/lighttpd/mime.conf"
include "/etc/lighttpd/conf.d/*.conf"

In the configuration file of " tplightd " is implemented by adding a comment before the line ".

Here are some modifications:

server.document-root = "/mnt" To set the document root to /mnt , I have added two hard disks for the router, which are respectively mounted under / MNT / sda1 and / MNT / sdb1. This storage location is not fixed and can be adjusted according to your own preferences.

server.port = 81 , that is, the port we use to access later. Port 80 has been occupied by the system's own uhtpd. Here, we set another port to prevent conflicts.

server.errorlog-use-syslog = "enable" This option can output the error log to syslog so that we can view the error in the web console.

server.dir-listing = "enable" , dir-listing.encoding = "utf-8" These two options enable the listing of files and prevent garbled file names.

Configure WebDAV module

adopt vi /etc/lighttpd/conf.d/30-webdav.conf Open the main configuration file for lighttpd.

This is a configuration file:

##  WebDAV Module
## ---------------
## See ModWebDAV
server.modules += ( "mod_ webdav" )

#$HTTP["url"] =~ "^/dav($|/)" {
  ## enable webdav for this location
  webdav.activate = "enable"

  ## By default the webdav url is writable.
  ## Uncomment the following line if you want to make it readonly.
  ## = "enable"

  ## Log the XML Request bodies for debugging
  #webdav.log-xml =  "disable"

  webdav.sqlite-db-name = "/tmp/lighttpd-webdav.db"

Here are some modifications:

The notes are missing $HTTP["url"] =~ "^/dav($|/)" { , } Two lines. Lighttpd is installed for WebDAV. Comment out these two lines to set the entire website as WebDAV.

webdav.activate = "enable" WebDAV is enabled for the entire site. = "enable" To set the running mode to read-only mode, set here disable You can disable read-only (i.e., write read).

"/mnt/sda1/.lighttpd-webdav.db" Here, you need to set a database storage location for the WebDAV module. It is recommended to select the location on the hard disk. In addition to locking, the database file needs to store some attributes, such as /tmp )It will result in data loss, and the storage location other than the hard disk will shorten the life of flash memory (flash memory has an upper limit for erasing). Please note that lighttpd needs to have write permission to the directory of the storage location chmod a+w xxx , to grant permissions.


  • Content on the openwrt Forum:
  • Documents provided by lighttpd: ModWebDAV

Configure auth module

This configuration is used to improve the security of your files, but it is not necessary. Moreover, this configuration can only improve a little security. Attackers can still intercept passwords in the middle of the way. If you want to improve the security, please configure HTTPS.

adopt vi /etc/lighttpd/conf.d/20-auth.conf Open the main configuration file for lighttpd.

This is a configuration file:

##  Authentication Module
## -----------------------
## See modauth
## for more info.
server.modules += ( "mod_ auth" )

auth.backend                 = "plain"
auth.backend.plain.userfile  = "/etc/lighttpd/lighttpd.user"
#auth.backend.plain.groupfile = "/etc/lighttpd/"

#auth.backend.ldap.hostname = "localhost"
#auth.backend.ldap.base-dn  = "dc=my-domain,dc=com"
#auth.backend.ldap.filter   = "(uid=$)"

auth.require               = ( "/" =>
                                 "method"  => "basic",
                                 "realm"   => "Personal File Server",
                                 "require" => "valid-user"


Here are some modifications:

It may be due to the negligence of the package packer, which was not found in the original configuration file server.modules += ( "mod_ auth" ) In order to have this module enabled, you have to add a line.

auth.backend = "plain" Back end authentication plain

auth.backend.plain.userfile = "/etc/lighttpd/lighttpd.user" , set the location where authentication information is stored in the authentication backend.

auth.require = ..... This means that authentication is enabled.

"/" , which represents the authentication location. This is the whole station.

"method" => "basic" , the type of authentication, which is set to basic The client is for better compatibility.

"realm" => "Personal File Server" , that is, the message prompted during authentication, which can be set arbitrarily.

adopt touch /etc/lighttpd/lighttpd.user We can create the authentication information file we need.

adopt vi /etc/lighttpd/lighttpd.user Edit the certification information file.

This is an example:


See user name and password : Separate. Multiple users are separated by a blank line.


  • Documents provided by lighttpd: modauth