Posts

What I did until many slimes spawn on slime chunk

What I did Waiting place and not to spawn mods Create Multi layers Sprinkling is the most difficult About timing when slime spawns Once Despawn A sure way Build slime farm trap tower Conclusion What I did First I found a slime chunk using Slime Finder . This is the basic in the basics. Dig into Y=40 heights in the slime chunk found. From there continue to create a space of height 3 until it hit the ground. Fills a range of 128 squares from the slime chunk with torches. Wait at least 28 blocks and not more than 128 blocks from the slime chunk. The above is the basis of how to spawn slime. But I did not spawn a lot of slime with just the above. So I repeated a lot of trial and error. Waiting place and not to spawn mods Once you have created a layer, you have to wait in the range from 28 to 128 blocks from there. And mods must not to be spawned against X axis, Y axis Z axis within 128 blocks from this waiting place. You must make the range of 128 block

How to set JAVA_HOME when installed OpenJDK with yum

Answer export JAVA_HOME=$(readlink $(readlink $(which java))) First which java returned the below path. /usr/bin/java Next command readlink $(which java) returned the below path. /etc/alternatives/java Last command readlink $(readlink $(which java)) returned the below path. /usr/lib/jvm/java-9-openjdk-amd64/bin/java And you can be assigned this result to environment variable.

curl with proxy

curl --proxy-ntlm --proxy sample .proxy .com : 8080 www .google .com Or write it in ~/.curlrc as follows. proxy = "http://sample.proxy.com:8080"

Connect wireless keyboard to RaspberryPi

You can do it easily by using bluetoothctl on Jessie. Versions Raspberry Pi Type B Single Board Computer 512MB Raspbian 8.0 (Jessie) Kernel Version 4.1.10 BlueZ 5.23-2+b1 Start agent mode with bluetoothctl. yy:... is the MAC address of the receiver, xx:... is the Mac address of the keyboard. pi@raspberrypi ~ $ sudo bluetoothctl -a [NEW] Controller yy:yy:yy:yy:yy:yy BlueZ 5.23 [default] Agent registered [bluetooth] # Scan interactively your keybaord. [bluetooth] # scan on Discovery started [NEW] Device xx :xx :xx :xx :xx :xx BSKBB24 Connect your keyboard. [bluetooth] # connect xx :xx :xx :xx :xx :xx Attempting to connect to xx :xx :xx :xx :xx :xx [CHG] Device xx :xx :xx :xx :xx :xx Connected : yes Connection successful Trust your keyboard to connect auto. [bluetooth] # trust xx :xx :xx :xx :xx :xx [CHG] Device xx :xx :xx :xx :xx :xx Trusted : yes Changing xx :xx :xx :xx :xx :xx trust succeeded

Detect Bluetooth LE Device with BlueZ on RaspberryPi

BlueZ is a project to control Bluetooth Device on Linux. BlueZ is also required when controlling BLE with RaspberryPi. In this article, how to install BlueZ and I tried to run a simple Python script sample with BlueZ. Versions Raspberry Pi Type B Single Board Computer 512MB Raspbian 7.8 Python 2.7 BlueZ 5.32 pybluez 0.22 Boost 1.49 Install BlueZ into RPi sudo apt-get install libdbus-1-dev libdbus-glib-1-dev libglib2.0-dev libical-dev libreadline-dev libudev-dev libusb-dev make mkdir -p work/bluetooth cd work/bluetooth wget https://www.kernel.org/pub/linux/bluetooth/bluez-5.32.tar.xz tar xvf bluez-5.32.tar.xz cd bluez-5.32 ./configure --disable-systemd --enable-library make sudo make install Manually install commands that are not installed by make. sudo cp attrib/gatttool /usr/local/bin/ sudo cp -ipr lib/ /usr/include/bluetooth.5.32 cd /usr/include sudo mv bluetooth bluetooth.4.99 sudo ln -s bluetooth.5.32/ bluetooth Detecting test with hcitool

Counting up Java source code lines on Eclipse

Image
I use the open source Eclipse plugin called StepCounter. Download the latest jar file from https://github.com/takezoe/stepcounter/releases . Please download the latest jar file It will be placed in Eclipse’s plugins folder. For example path: /path/to/eclipse/plugins/jp.sf.amateras.stepcounter_3.0.3.201404150124.jar Restart Eclipse and complete install it. Let’s try it. Right click on the project and select "Step Counter" -> "Count Step Number" A view named count result is displayed. It also counts the number of blank lines and lines of comments. It can not count the number of lines in class file or jar file. You can also export to Excel.

How to set X-Forward-For on Apache httpd

I think you want to use X-Forwarded-For when you use a load balancer. Because the IP address acquired by the web server becomes the IP address of the load balancer. In this article I will show how to restrict IP using X-Forwarded-For and how to output X-Forwarded-For to the log. Apache httpd introduced in this article is installed based on chef. X-Forwarded-For logging Restrict IP with X-Forwarded-For X-Forwarded-For logging vim /etc/httpd/conf/httpd.conf Create a custom log definition called "combined" . LogFormat " %h %l %u %t \" %r \" %> s %b \" %{Referer} i\" \"%{User-Agent}i\"" combined ↓ LogFormat " %h %l %u %t \" %r \" %> s %b \" %{Referer} i\" \"%{User-Agent}i\" \"%{X-Forwarded-For}i\"" combined vim /etc/httpd/sites-enabled/000-default 000-default is the file setting VirtualHost. Set to use combined. CustomLog / var / log