Posts

Welcome T480 and Multiple OS, :(

Image
Note for setting up Kubuntu 18.04 then Window7 My laptop(T480) current status is setup with Kubuntu without UEFI enable. Until I find the way to do that I will leave it like this. First, I setup Kubuntu with this layout 3 partitions (all /dev/sda) (pri)/dev/sda1 as /root (log)/dev/sda2 /dev/sda5 as /home (pri)/dev/sda3 as swap Got 1 space left, size around 450gb, leave it unformatt. Then I got  usb (window7 extracted) plug, then reboot the machine. Let window installer format and use that space. When It's done, It's reboot. Then I come to d.step. My laptop can boot only Window7. Here are the rescue steps Find one Linux extracted USB (probaby made from Unetbootin) Boot with it (I am in LiveCD mode), then grab boot-repair from some of instructions from site below https://help.ubuntu.com/community/Boot-Repair Do what's site guide, then I got Grub menu and Kubuntu back. But window gone. It's ok, boot laptop to Kubuntu, setup boot-repair by

Changing postgres password and warning

ORIGINAL from https://serverfault.com/questions/110154/whats-the-default-superuser-username-password-for-postgres-after-a-new-install CAUTION  The answer about changing the UNIX password for "postgres" through "$ sudo passwd postgres" is not preferred, and can even be  DANGEROUS ! This is why: By default, the UNIX account "postgres" is locked, which means it cannot be logged in using a password. If you use "sudo passwd postgres", the account is immediately unlocked. Worse, if you set the password to something weak, like "postgres", then you are exposed to a great security danger. For example, there are a number of bots out there trying the username/password combo "postgres/postgres" to log into your UNIX system. What you should do is follow  Chris James 's answer: sudo -u postgres psql postgres # \password postgres Enter new password: To explain it a little bit. There are usually two default ways to login to
Hi Everyone :) I just beginning new post in new year with Xubuntu fresh installed on X260. A bit of problems around. This post will relate to one problem I found recently. Problem:   I cannot bring bring `brightness` back after return from suspend. Summarize solutions:   1.1. Create this file by command `sudo touch /usr/share/X11/xorg.conf.d/20-intel.conf`   1.2. Add this to file Section "Device"         Identifier  "card0"         Driver      "intel"         Option      "Backlight"  "intel_backlight"         BusID       "PCI:0:2:0" EndSection   1.3. Restart or may be logout and login   2.1. Edit this file by command `sudo vi /etc/default/grub`   2.2. Modify previous to with this GRUB_CMDLINE_LINUX_DEFAULT="quiet splash acpi_osi=Linux apci_backlight=vendor"   2.3. We should restart, i guess Finally, I still don't know if it work, but hey, right now it's fine for me

Cool bash command for summary bot visited

I just found quite cool bash combination cat test.log | awk -F\" '{print $6}' | sort | uniq -c | sort -n from this  http://www.blogtips.org/web-crawlers-love-the-good-but-kill-the-bad-and-the-ugly/ I try it with nginx log, the result is look good. :)

Reupload stuff to S3 with aws cli

Hi, my friend.     Today I have done some stuff using aws cli. It's quite a good tools beside python+boto. My task in this period is about devops+dev :p. So currently I created some image migrate script in python. It is for reprocess an images using Imagemagick. Then it need to be upload to S3. The accident is about I forget to assign ACL for all images before upload to S3. User cannot see ours images. I try some stuff from google then I realize that I never try linux:touch command before. And It works. I use command >> aws s3 sync . s3://mybucket --dryrun to check if tools can reupload for me. :) Luck is on my side now!!!. So I just >> find . -name 'xxx.yyy' | xargs touch  and >> aws s3 sync . s3://mybucket --acl public-read Finally. Yeah, Shit Done!!!! Next Post I will describe about my python script + imagemagick

Create new user with sudo permission

Usecase: I install linux without GUI ( so it didn't provide ubuntu user ). If I want to have another with sudo permission. Let's try this be root or user with root permission >> adduser sudo because in sudoer file, said Any user in group sudo, will have permission to use sudo command ref: http://askubuntu.com/questions/7477/how-can-i-add-a-new-user-as-sudoer-using-the-command-line

Release with exrm in Elixir

Hi All :) I'm using exrm (https://github.com/bitwalker/exrm) for releasing process. It's quite nice library. Even I don't actually know what it done behind (digging it now). Notice that some important issue is about if your application cannot start because some thing or function is invalid or cannot not load but you sure that you put it in mix.exs in deps list. So this https://exrm.readme.io/docs/common-issues will inform us to put it in mix.exs in applications list, too. Even i don't understand why, because in elixir's doc of mix's topic said if app implemented by use "Application" behaviour. They should be put in mix.exs application list. But chronos's code doesn't seem to implement with "Application" behaviour. Anyway i tried put it in that list, and its work!!.