Self-hosting Nitter, a Twitter Web Client, with Docker

Twitter Web client on Docker

Restrictions imposed by Twitter 2023/6/30 Because of Twitter's API restrictions and the restriction on viewing without logging in, fetching Twitter posts and so on through nitter is no longer possible Building Nitter with Docker as described below is still possible, but it is of no use unless the restrictions on the Twitter side are lifted Nitter is a Web client for Twitter, and you can view it without having a Twitter account you can view it without logging in to Twitter no ads are inserted you can turn the timeline of a user or keyword you are interested in into RSS This time I build it myself with Docker, but Nitter has an official site and instances, and using those is fine, so there is no need to force yourself to build it [Read More]
Categories: docker oss  Tags: twitter 

Testing SMTP Sending with Postfix and MailHog on Docker

Testing SMTP on Docker(postfix+mailhog)

I had a situation where I wanted to send SMTP from inside a Docker container, so I gave it a try using mailhog.

I based this almost entirely on the article above (in Japanese)

What I changed

  • Changed the Dockerfile image to almalinux
    Because centos8 is past EOL and an error came up when fetching packages
  • Added privileged: true to docker-compose.yml
    It did start with cap-add as well, but errors were being emitted

Send test

  • Once it has finished starting up, check inside the Docker container whether postfix can send on port 25.
  • Since relayhost uses mailhog’s port 1025, it is not actually sent to the real destination, so there is nothing to worry about
  • On the host side you can send on port 1025 as is
# telnet localhost 25
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
220 0d95f56f386c.example.com ESMTP Postfix
mail from: <[email protected]>
250 2.1.0 Ok
rcpt to: <[email protected]>
250 2.1.5 Ok
data
354 End data with <CR><LF>.<CR><LF>
subject: mail testing
it is testing
.
250 2.0.0 Ok: queued as 367DF26008A

Leave the Docker container, access http://localhost:8025 in a browser on the host side, and if the mail has arrived you are done

Categories: docker  Tags: postfix 

Trying MinIO, an Amazon S3 Compatible Object Storage, on Docker

testing minio on docker

minio is an Amazon S3 compatible object storage

It is provided for platforms such as Mac/Windows/Linux as well, but Docker is handy when you just want to try it out a little, so I will build it with docker-compose

Once you have started it with docker-compose up -d,

  1. Connect to http://localhost:9000 in a browser
  2. Log in with admin/password
  3. Create a bucket with Create Bucket
  4. Upload files and folders

The interface is exactly the same as Amazon S3, so AWS-CLI can be used too, but in order to connect to minio you need to specify --endpoint-url .
Amazon S3 is charged by usage, so if you self-host minio you can use it for free.

Categories: docker oss  Tags: amazons3 

Extracting IP Addresses from a Log File with grep and sort

Find ip address in logfile.

Log files come in all kinds of formats, so you will not necessarily get the same result; treat this as a rough reference only. This time I extract the IP addresses of my own subnet from a dnsmasq log file The dnsmasq log Copy Jan 25 05:45:04 dnsmasq[1]: query[A] firestore.googleapis.com from 192.168.1.43 Jan 25 05:45:04 dnsmasq[1]: cached firestore.googleapis.com is 142.250.196.106 Jan 25 05:45:04 dnsmasq[1]: query[AAAA] firestore.googleapis.com from 192.168.1.43 Jan 25 05:45:04 dnsmasq[1]: cached firestore.googleapis.com is 2404:6800:4004:827::200a Jan 25 05:45:04 dnsmasq[1]: reply easylist-downloads.adblockplus.org is 65.21.35.75 Jan 25 05:45:04 dnsmasq[1]: reply easylist-downloads.adblockplus.org is 136.243.9.187 Jan 25 05:45:04 dnsmasq[1]: reply easylist-downloads.adblockplus.org is 141.95.40.123 Jan 25 05:45:04 dnsmasq[1]: reply easylist-downloads.adblockplus.org is 51.255.232.90 Jan 25 05:45:04 dnsmasq[1]: reply easylist-downloads.adblockplus.org is 95.216.77.130 Jan 25 05:45:04 dnsmasq[1]: reply easylist-downloads.adblockplus.org is 95.217.32.92 Jan 25 05:45:05 dnsmasq[1]: query[A] firestore.googleapis.com from 192.168.1.43 Jan 25 05:45:05 dnsmasq[1]: cached firestore.googleapis.com is 142.250.196.106 Jan 25 05:45:05 dnsmasq[1]: query[AAAA] firestore.googleapis.com from 192.168.1.43 - Extracting only the IP addresses From all of this, extract only the IP addresses in the form 192.168.1.* [Read More]
Categories: Linux  Tags: regex 

Key Repeat Does Not Work on Mac

Enable Key Repeating on MacOS

A note on fixing key repeat (holding a key) when it does not work with a U.S. keyboard on a Mac. Environment MacBook Pro (M1) macOS Monterey KeyChron K2 Symptoms Key repeat works fine in iTerm and Terminal hjkl key repeat also works in Vim Arrow-key repeat works In Growi’s Vim editor and in web form fields, key repeat does not work and a candidate list appears instead [Read More]
Categories: Mac 

Rebuilding My Zsh and Neovim Setup from Scratch in 2022

Zsh+zinit and NeoVim+vim-plug

I have been a fan of the Zsh shell on Linux and elsewhere for a long time, and lately I have even flirted with fish, but I took another look at my configuration files for the first time in ages. I had been managing my shared configuration files (dotfiles) on GitHub, and to my surprise the last update turned out to be about 10 years ago. (@_@) The configuration files were quite old too, and various helper tools and plugins have changed, so I reviewed everything from scratch. [Read More]
Categories: Shell editor  Tags: zsh neovim 

Running the Open Source IT Asset Manager Snipe-IT on Docker

How to Get Up and Running snipe-it on Docker

I wanted to manage software licences as well as the appliances and assets in my home, so I looked around for a good open source option, found the IT asset management system Snipe-IT, and set it up right away. This is how to install it with Docker Installation and configuration Copy $ git clone https://github.com/snipe/snipe-it.git Edit .env.docker Copy APP_DEBUG=false # please regenerate the APP_KEY value by calling `docker-compose run --rm snipeit bash` and then `php artisan key:generate --show` and then copy paste the value here APP_KEY=base64:3ilviXqB9u6DX1NRcyWGJ+sjySF+H18CPDGb3+IVwMQ= APP_URL=http://localhost:8000 -APP_TIMEZONE='UTC' -APP_LOCALE=en +APP_TIMEZONE='Asia/Tokyo' +APP_LOCALE=ja Port 8000 is used by default, so if you want to change it, change ports in docker-compose.yml [Read More]
Categories: OSS  Tags: docker 

Upgrading Debian 10 buster to Debian 11 bullseye

How to upgrade Debian 10 to 11

I have written about Debian upgrades several times, but the update procedure differs subtly from version to version, so it ends up being a separate article every time. This time it is the update procedure from Debian10 (buster) to 11 (bullseye). Checking Copy $ cat /etc/debian_version 10.11 Updating packages Copy $ sudo apt update $ sudo apt upgrade $ sudo apt dist-upgrade $ sudo apt autoremove Updating the source list (from buster to bullseye) There are changes, so be careful: it will not go well if you only change sources.list from buster to bullseye the way you used to. [Read More]
Categories: Linux  Tags: Debian 

Installing Zsh 5.9 from Source on CentOS 7 and 8

zsh 5.9 manual install on CentOS

zsh5.9 is the latest right now, so I have updated this article The zsh on CentOS7/8 is old, so I installed the latest version at this point, 5.9, by hand Preparation Since we use commands such as wget and make, install the developer tools first Copy $ export LANG=C $ sudo yum groupinstall "Development Tools" $ sudo yum install ncurses-devel Downloading and installing /usr/bin/zsh and /bin/zsh already exist, so install into /usr/local [Read More]
Categories: Shell  Tags: zsh redhat centos 

Overriding the LDAP Login Shell on Debian and CentOS Clients

override LDAP login shell

There are cases where, on a particular LDAP client machine, you want to use a different shell rather than the one defined on the LDAP server (bash) This is possible by configuring the Linux (Debian/CentOS) client to override the shell Debian11(bullseye) Add the following to /etc/libnss-ldap.conf (look up the path to the shell beforehand) Copy nss_override_attribute_value loginShell /usr/bin/zsh Flush the nscd cache Copy # nscd -i passwd nscd CentOS8 Add the following to /etc/nslcd.conf [Read More]
Categories: Linux  Tags: debian centos redhat ldap