sudo hostnamectl set-hostname example.comsudo apt install mailutils postfix-
- Choose "internet site", and type your domain (example.com)
mail [email protected] -s "Subject"- You should receive a mail from
[email protected]
| # Check server process is using jemalloc | |
| # ref. [Japanese] https://tech.studyplus.co.jp/entry/2019/09/09/094140 | |
| class AppController < ActionController::Base | |
| def show | |
| r = `strings /proc/#{Process.pid}/maps | grep jemalloc` | |
| render plain: "<h1>#{ENV['LD_PRELOAD'].presence || 'empty'}</h1><pre>#{r}</pre>" | |
| end | |
| end |
sudo hostnamectl set-hostname example.comsudo apt install mailutils postfixmail [email protected] -s "Subject"[email protected]AWS S3 now uses JSON for CORS configuration and cors.json is minimal configuration for Rails 7 direct uploads.
Install Termux, an Android terminal emulator that provides a Linux execution environment and various tools.
Update system packages in Termux:
$ pkg update -y
kubectl -n kube-system patch daemonset myDaemonset -p '{"spec": {"template": {"spec": {"nodeSelector": {"non-existing": "true"}}}}}'
kubectl -n kube-system patch daemonset myDaemonset --type json -p='[{"op": "remove", "path": "/spec/template/spec/nodeSelector/non-existing"}]'
| After automatically updating Postgres to 10.0 via Homebrew, the pg_ctl start command didn't work. | |
| The error was "The data directory was initialized by PostgreSQL version 9.6, which is not compatible with this version 10.0." | |
| Database files have to be updated before starting the server, here are the steps that had to be followed: | |
| # need to have both 9.6.x and latest 10.0 installed, and keep 10.0 as default | |
| brew unlink postgresql | |
| brew install [email protected] | |
| brew unlink [email protected] | |
| brew link postgresql |
| import { | |
| HttpInterceptor, | |
| HttpRequest, | |
| HttpResponse, | |
| HttpHandler, | |
| HttpEvent | |
| } from '@angular/common/http'; | |
| import 'rxjs/add/operator/map'; | |
| @Injectable() |
/var/log/cron./var/log/cron.* * * * * /bin/date --rfc-3339=seconds >> /var/log/cron
*/2 * * * * /bin/echo 'tick' >> /var/log/cron
| #!/usr/bin/env ruby | |
| require "openssl" | |
| require 'digest/sha2' | |
| require 'base64' | |
| # We use the AES 256 bit cipher-block chaining symetric encryption | |
| alg = "AES-256-CBC" | |
| # We want a 256 bit key symetric key based on some passphrase | |
| digest = Digest::SHA256.new |