Monday, October 8, 2018

how to save and restore session with vim

  • open vi, do anything you want to do
  • :mksession!
  • quite vi
  • open vi again and load the saved session with:
  • :so Session.vim


Saturday, September 22, 2018

intermittent disconnection with mysql

max connections
max open files limit
limit_nofile limitnofile

http://vswsystems.com/mysql-buffered-warning-changed-limits-max_connections-214-requested-800/

Friday, August 10, 2018

how to convert text file into png using imagemagick

# disable policy "path" at /etc/ImageMagick-6/policy.xml

then

convert -trim +repage -font FreeMono -size 1200x1200 -border 2 \
-pointsize 18 label:@trip_itinerary trip_itinerary.png

You may want to adjust the number 1200x1200 to be something bigger as needed which depends on the size of your input text file (trip_itinerary in this example).

Wednesday, May 16, 2018

how to manually boot linux installed on a harddisk using live cd

- boot a linux live cd
- press C on the grub screen to enter grub console
- ls
- ls (hd1,msdos3)/boot/grub
- ls (hd1,msdos3)/home
- set root=(hd1,msdos3)
- ls -l (hd1,msdos3)
- linux /boot/vmlinuz [tab] root=UUID=...
- initrd /boot/initrd [tab]
- boot

reference:
  • https://askubuntu.com/questions/516535/how-can-i-use-the-installer-to-manually-boot-into-a-system-without-grub-installe

Wednesday, May 9, 2018

How to reset Windows 7 password

Change into the Windows/System32/config directory.

sudo chntpw SAM
sudo chntpw -l SAM
sudo chntpw -u "USER NAME" SAM


https://www.techrepublic.com/blog/tr-dojo/reset-windows-passwords-with-the-help-of-linux/

Tuesday, May 8, 2018

Monday, November 20, 2017

how to install signal-desktop in a sandbox on subgraph os

1. paxrat configurations, quoted from hThoreau:

I've had to add a pax profile for wire-desktop, like so: 

user@subgraph:~$ cat /etc/paxrat/conf.d/wire-desktop.conf

{ "/opt/wire-desktop/wire-desktop": {
  "flags": "m"
  }
}

After that, have it loaded by paxrat using sudo paxrat -x and then run it. If this does not work for you, try calling it while running sudo journalctl -f on another terminal window, and then launching it. Then, publish here the output of it so that we can assess what it blocking your application.

https://github.com/subgraph/subgraph-os-issues/issues/264#issuecomment-345532376

2. oz configurations

Friday, October 20, 2017

lshort-thaitrans

https://github.com/shebang-tech/lshort-thaitrans

"""
This is a Thai translation of the book, "The Not So Short Introduction to LaTeX2e", version "5.06, June 20, 2016" by Tobias Oetiker.
นี่คือ หนังสือ The Not So Short Introduction to LaTeX2e version 5.06 ที่ถูกเขียนเสร็จเมื่อ วันที่ 20 มิถุนายน ค.ศ. 2016 โดย คุณ Tobias Oetiker ฉบับภาษาไทย ที่ถูกแปลโดย shebang.tech
"""

งานแปลได้เริ่มขึ้นแล้ววันนี้ ยินดีรับอาสาสมัครมาร่วมด้วยช่วยแปลนะครับ

Sunday, October 15, 2017

grml and a newbie verse in Thai

ฉันลง grml ลินุกซ์ นานมา หลายปี
ฉันใช้งานมันมา ทั่วโลก
วันนึงนึกอิจฉา คนอื่น จึงโง่
พิมพ์สั่ง apt-get dist-upgrade ซะ... เครื่องเละ ทันที