ก๊วนซอฟท์แวร์ </softganz> SoftGang (Gang Software)

Web &amp; Software Developer Gang.

603 items|« First « Prev 9 10 (11/61) 12 13 Next » Last »|
โดย Little Bear on 12 ก.ย. 58 11:37

น่าเบื่อมาก เวลา copy file ก็จะติดไปด้วย

วิธีลบทิ้ง ทำอย่างนี้

sudo find /Users -depth -name ".DS_Store" -exec rm -f {} \;

ส่วนไฟล์อื่น เช่น .localized

sudo find /Users -name ".localized" -depth -exec rm -f {} \;

ส่วนไฟล์ .AppleDouble ที่อยู่ใน network drive ก็ลบด้วยคำสั่ง

find . -name '.AppleDouble' -printf '"%p"\n' | xargs rm -Rf

ยกเลิกการสร้างไฟล์โดย

defaults write com.apple.desktopservices DSDontWriteNetworkStores true

และวิธี backup ข้อมูลด้วย rsync

rsync -trv /Users/src/ /Volumes/drive/dest/
โดย Little Bear on 2 ก.ย. 58 09:33

ตัวแปรสำคัญที่สามารถจะอธิบายถึงลักษณะผลตอบแทนของ บัฟเฟตต์ ออกมาก็คือ

  1. Safe : ความปลอดภัย หรือความผันผวนของหุ้นที่ต่ำกว่าตลาด โดยพวกเขาได้พบว่า บัฟเฟตต์ มักเลือกซื้อหุ้นที่มีความผันผวนที่ต่ำกว่าตลาดอยู่เสมอ (เช่น Low Volatility or Low Beta)

  2. Cheap : ราคาที่ถูก หรือ ส่วนต่างของราคากับมูลค่าของหุ้นในขณะนั้น โดยพวกเขาได้พบว่า มักเลือกซื้อหุ้นในราคาที่ถูกกว่ามูลค่าอยู่เสมอ (เช่น Low Value or Low Price-to-Book Ratio)

  3. Quality : กิจการที่ดี หรือ ความสม่ำเสมอของผลกำไร อัตราการเติบโต และอัตราการจ่ายเงินปันผลที่สูง (Payout Ratio) โดยพวกเขาได้พบว่า บัฟเฟตต์ มักเลือกซื้อหุ้นที่มีคุณภาพของกิจการที่ดีอยู่เสมอ

ลองอ่านบทความฉบับเต็มได้ที่ mangmaoclub.com

โดย Little Bear on 23 ก.ค. 58 12:20

เป็นครั้งแรกที่ Mac มีปัญหา หลังจากอัพเดท OS X 10.11 El Capitan แล้วเปิดเครื่องค้าง ก็เลยปิดเครื่อง แล้วก็เปิดไม่ได้ เปิดแล้วเครื่องก็ดับเอง งั้นดูวิธีในการเปิดเครื่องของ OS X กันนะครับว่ามีวิธีเปิดแบบไหนกันบ้าง

1. Recovery Mode

เปิดเครื่อง เมื่อได้ยินเสียง ให้กดปุ่ม Command R

2.Startup Manager

เปิดเครื่อง เมื่อได้ยินเสียง ให้กดปุ่ม Alt/Option

3.Safe Boot

เปิดเครื่อง เมื่อได้ยินเสียง ให้กดปุ่ม Shift

4.Reset PRAM

เปิดเครื่อง เมื่อได้ยินเสียง ให้กดปุ่ม Command, Option, P, and R

5.Verbose Mode

เปิดเครื่อง เมื่อได้ยินเสียง ให้กดปุ่ม Command V

6.Mac Single User Mode

เปิดเครื่อง เมื่อได้ยินเสียง ให้กดปุ่ม Command S

7.Enable Target Disk Mode

เปิดเครื่อง เมื่อได้ยินเสียง ให้กดปุ่ม T

Startup Keys Description

  • Command-R Boot to OS X Recovery Mode
  • Alt/Option Access Mac Startup Manager
  • C Boot to CD, DVD, or USB
  • N NetBoot
  • Shift Safe Boot
  • Command-V Verbose Mode
  • Command-S Single User Mode
  • Command-Option-P-R Reset PRAM
  • T Enable Target Disk Mode

อ่านแบบเต็ม ๆ ได้ที่ 7 Mac Startup Options Every OS X User Should Know

โดย Little Bear on 18 ก.ค. 58 11:34

เป็นวิศวกร ต้องเป็นผู้สร้าง
เป็นผู้สร้าง ต้องเป็นผู้ออกแบบ
เป็นผู้ออกแบบ ต้องมีการบันทึกวิวัฒนาการของผลิตภัณฑ์อย่างเป็นระบบ
...
วิศวกรที่ไม่เคยสร้างอะไร
ไม่ควรเรียกว่าวิศวกร
...
กระบวนการบันทึกวิวัฒนาการของผลิตภัณฑ์ของผม
พบว่า...ยังจัดการได้ไม่ดีพอ
บางช่วงเวลา...ก็เขียนบันทึกไว้
บางช่วงเวลา...ก็แทบไม่ได้เขียนเลย
ที่แย่กว่านั้นคือ...ที่เขียนบันทึกไว้หลาย ๆ เล่ม ไม่รู้ว่าวางเก็บไว้ที่ไหนแล้ว

จาก เบื้องหลังกระบวนการออกแบบผลิตภัณฑ์ของ Dyson จากงาน Dyson Design Talk

โดย Little Bear on 10 ก.ค. 58 16:43

แก้ config ของ Apache

sudo nano /etc/apache2/httpd.conf
AllowOverride All

เปิดใช้งาน mod_rewrite

LoadModule rewrite_module libexec/apache2/mod_rewrite.so

Install PHP

brew update
brew install php@7.3
brew link php@7.3
brew services start php@7.3

เปิดใช้งาน php

LoadModule php7_module libexec/apache2/libphp7.so

เปลี่ยน DocumentRoot ของ web

sudo mv /Library/WebServer/Documents /Library/WebServer/Documents.old
sudo ln -s /New/Web/Folder /Library/WebServer/Documents

แก้ php config โดย cp /etc/php.ini.default /etc/php.ini

post_max_size = 16M
upload_max_filesize = 1024M

date.timezone = Asia/Bangkok

Restart Apache

sudo apachectl configtest
sudo apachectl -k restart

ที่มา macOS 10.15 Catalina Apache Setup: SSL


Install MariaDB

brew install mariadb

Start MariaDB

Service start

brew services start mariadb

Start without service

mysql.server start

Link data to new location

sudo ln -s /Users/mysql /usr/local/var/mysql
sudo chown -h user:group /usr/local/var/mysql

แก้ไข config file ~/.my.cnf

sql_mode = NO _ ENGINE _ SUBSTITUTION,STRICT _ TRANS _ TABLES

default-storage-engine = MYISAM
collation-server = utf8_unicode_ci
character-set-server = utf8

Auto Start

launchd In MacOS, create a file called /Library/LaunchDaemons/com.mariadb.server.plist with the following contents (edit to suit):

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
        <key>Label</key> <string>com.mariadb.server</string>
        <key>KeepAlive</key><true/>
    <key>RunAtLoad</key><true/>
    <key>LaunchOnlyOnce</key><false/>
    <key>ExitTimeOut</key><integer>600</integer>
        <key>WorkingDirectory</key><string>/usr/local/var</string>
        <key>Program</key><string>/usr/local/bin/mysqld</string>
        <key>ProgramArguments</key>
        <array>
        <string>/usr/local/bin/mysqld</string>
        <string>--user=_mysql</string>
        <string>--basedir=/usr/local/opt/mariadb</string>
        <string>--plugin-dir=/usr/local/opt/mariadb/lib/plugin</string>
        <string>--datadir=/usr/local/var/mysql</string>
        <string>--log-error=/usr/local/var/mysql/Data-Server.local.err</string>
        <string>--pid-file=/usr/local/var/mysql/Data-Server.local.pid</string>
        <string>--sql-mode=ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION</string>
        </array>
</dict>
</plist>

Then from a shell, run launchctl load /Library/LaunchDaemons/com.mariadb.server.plist and MariaDB will run immediately, and also upon reboot.


Fix the 2002 socket error first if you haven’t done so from the MySQL section-

sudo mkdir /var/mysql

Location -> /usr/local/Cellar/mariadb/{version}

Data location /usr/local/var/mysql/


sudo ln -s /tmp/mysql.sock /var/mysql/mysql.sock

Start MySQL

sudo /usr/local/mysql/support-files/mysql.server start

Stop MySQL

sudo /usr/local/mysql/support-files/mysql.server stop

Restart MySQL

sudo /usr/local/mysql/support-files/mysql.server restart

โดย Little Bear on 16 มิ.ย. 58 12:31

ตรงตามแนวความคิดของเราที่จะตกแต่งสวนให้เป็นสวนกินได้ แต่ไม่ค่อยมีหัวทางด้านศิลป์

ตอนนี้รอให้ปรับพื้นที่ให้เรียบร้อยก่อน แล้วค่อยดำเนินการ ระหว่างนี้ก็หาแบบ ร่างแบบไปก่อน

ลองตามไปดูเพิ่มเติมได้ที่ pickleshlee.wordpress.com

โดย Little Bear on 11 มิ.ย. 58 00:00

การฝัง Web Font กับไฟล์ CSS เป็นการลดจำนวน request ให้เหลือแค่ไฟล์เดียว ซึ่งจะช่วยลดเวลา เพิ่มความเร็วในการโหลดเว็บ โดยการ Encode ไฟล์ Font โดยใช้ WebFont Generator เช่น fontsquirrel.com มาช่วยแปลง Font และสร้าง Stylesheet แบบ base64

วิธีการ

  1. แปลง Font ด้วยเว็บ fontsquirrel.com มีทริกสำหรับ Font ภาษาไทยที่จะต้องเลือก Subsetting เป็น  No Subsetting ลองดูวิธีการได้จาก www.tutor4dev.com

  2. นำเอา css ที่ได้มาใส่ในเว็บ

ส่วนใครอยากใช้วิธีการติดตั้ง Font แบบเดิม ก็ลองเข้าไปอ่านบทความได้จาก วิธีใส่ฟ้อนต์ไทยลงในเว็บไซต์ ด้วย CSS3 @font-face แบบ Step by Step

มีแหล่งดาวน์โหลด Fonts ฟรี ๆ หลายที่ ลองแวะเข้าไปดูได้ที่ www.designil.com

ที่มา www.tutor4dev.com , fontsquirrel.com

โดย Little Bear on 9 มิ.ย. 58 13:28

HTML5 จะส่ง attribute data-xxxx ด้วย lowercase เสมอ เช่น

<a id="mytag" href="sg-box" data-maxWidth="60%">Link</a>

ค่าของ $("#mytag").data("maxWidth") จะเป็น undefine โดยจะกลายเป็น $("#mytag").data("maxwidth") แทน

แต่มีวิธีการให้สามารถส่งเป็น case sensitive ได้โดยใช้

<a id="mytag" href="sg-box" data-max-width="60%">Link</a>

data-max-width="60%" จะถูกแปลงเป็น $("#mytag").data("maxWidth")

โดย Little Bear on 21 เม.ย. 58 22:00

TerraBKK Research เป็นผู้รวบรวมข้อมูลรายชื่อบริษัทไทยที่มี ROE มากกว่า 25% ที่น่าสนใจเอาไว้ให้ไปลองศึกษาเพิ่มเติมในหุ้นที่น่าสนใจ

ที่มา terrabkk.com

 คำอธิบายภาพ : ROE_CHART-57

 คำอธิบายภาพ : ROE_TABLE-57

 คำอธิบายภาพ : ROE_Trend-57

โดย Little Bear on 17 เม.ย. 58 19:56

เพิ่งได้ Mac Book Pro with Ratina 13" มาเมื่อ 8 เมษายน 2558 กำลังอยู่ในช่วงเรียนรู้ของใหม่ เลยเก็บบันทึกการติดตั้ง ปรับแต่ง และการลงโปรแกรม ไว้เพื่อเตือนความจำของตนเอง

เริ่มต้นด้วยการทำตัวให้เป็น server

ด้วย Get Apache, MySQL, PHP and phpMyAdmin working on OSX 10.13 High Sierra สำหรับ OSX 10.10 Yosemite Get Apache, MySQL, PHP and phpMyAdmin working on OSX 10.10 Yosemite

mysql data folder : /usr/local/mysql-5.6.24-osx10.8-x86_64/data/

ln -s /Users/mysql data

tar -xzf ../mysql.tar.gz mysql/data/folder

Homebrew โปรแกรมช่วยติดตั้งแบบ apt-get ของ Ubuntu

ติดตั้ง Homebrew เสียก่อน โดย Install Homebrew เพื่อจะได้ใช้คำสั่ง brew install สำหรับลงโปรแกรมพื้นฐานของตระกูล NIX

SubLime

Sublime เป็น Editor ที่ยังไม่ได้ซื้อ http://appnee.com/sublime-text-3-universal-license-keys-collection-for-win-mac-linux/

Key ถูกลบ ไม่แสดงให้เห็น

***

วิธี Print Screen เก็บเป็นไฟล์

  • Command+Shift+3: takes a screenshot of the full screen (or screens if multiple monitors), and save it as a file to the desktop
  • Command+Shift+4: brings up a selection box so you can specify an area to take a screenshot of, then save it as a file to the desktop
  • Command+Shift+4, then spacebar, then click a window: takes a screenshot of a window only and saves it as a file to the desktop
  • Command+Control+Shift+3: take a screenshot of the entire screen (screens if multiple monitors), and saves it to the clipboard for pasting elsewhere
  • Command+Control+Shift+4, then select an area: takes a screenshot of selection and saves it to the clipboard for pasting elsewhere
  • Command+Control+Shift+4, then space, then click a window: takes a screenshot of a window and saves it to the clipboard for pasting

เปลี่ยนนามสกุลของไฟล์

defaults write com.apple.screencapture type jpg
killall SystemUIServer

ที่มา theturninggate.net

Trick

  • ไม่ชอบเลยกับไฟล์ .DS_Store ก็ How to stop creating .DS_Store on Mac?
  • เกลียดนักดับไฟล์ .DS_Store ก็ย้ายมันออกไปเสีย อย่าให้มันโผล่หน้าออกมาอีกเลยด้วย Asepsis
603 items|« First « Prev 9 10 (11/61) 12 13 Next » Last »|