今年基本上就是慘,前11個月,好像只有一個月是有獲利,其他都賠錢。
12月開始把交易條件訂的比較高,所以交易次數不多,雖然前兩週都只做1口單賣當沖,但至少都有賺,第三週目前確定是沒交易機會了,希望剩下兩週也能順一點,至少讓我最後一個月也是獲利結束今年,把希望寄託在明年。
今年基本上就是慘,前11個月,好像只有一個月是有獲利,其他都賠錢。
12月開始把交易條件訂的比較高,所以交易次數不多,雖然前兩週都只做1口單賣當沖,但至少都有賺,第三週目前確定是沒交易機會了,希望剩下兩週也能順一點,至少讓我最後一個月也是獲利結束今年,把希望寄託在明年。
用SQUID架好Proxy Server後,都蠻順利的,開網站,用LINE,SKYPE等外部的程式都正常。
但要開啟內部的https網站時,就會無法顯示,錯誤訊息會說"網頁可能暫時離線,或是已經遷移到另一個網址"。
在access log裡查到的紀錄都是 "NONE/503 0 CONNECT"。
然後就開始上網到處查,然後有看到有些人提到在squid.conf 裡要加入一行"dns_v4_first on",雖然感覺這跟我的問題不相關,但就試試吧。
結果在conf裡先搜尋dns的字眼時,看到了這段,"dns_nameservers 8.8.8.8 208.67.222.222"。
DNS居然是指向外部,所以就把內部的DNS SERVER IP加到最前面,重啟服務,就解決這個問題了。
SQUID Proxy Unable to Connect to Internal HTTPS Websites - NONE/503 0 CONNECT
After setting up the SQUID Proxy Server, everything seemed to be working smoothly. Websites loaded fine, and external applications like LINE and Skype functioned properly. However, when trying to access internal HTTPS websites, they would not display, and an error message stating "The webpage might be temporarily down or may have moved to a new address" would appear.
Upon checking the access log, the recorded entries were "NONE/503 0 CONNECT."
I started searching online for a solution and came across a suggestion to add the line "dns_v4_first on" to the squid.conf file. Although it didn't seem directly related to my issue, I decided to give it a try.
While searching for the term "dns" in the configuration file, I came across the following line: "dns_nameservers 8.8.8.8 208.67.222.222."
To my surprise, the DNS servers were pointing to external addresses. So, I added the IP address of the internal DNS server to the beginning of the list, restarted the service, and the problem was resolved.
一台QNAP TS-432XU(4.3.6)有4顆硬碟做RAID5,最後一顆硬碟已出現警告建議更換,雖然還可以用,但這顆硬碟的讀寫速度慢很多,所以影響到一些日常作業。
原本同型號的硬碟停產了,所以就買一個同廠牌同容量,但轉速更快的來換。
雖然知道是熱插拔,但一開始還上網看一下是不是要在管理介面上做什麼操作,後來查到的畫面又跟自己的不同,就決定直接插拔更換了。
插上後系統就自己在重建了,蠻方便的,剩下就讓它跑完重建程序了。
在QNAP NAS設定好電子郵件設定,用來發送警告信給管理者,設定好後測試,卻都失敗,錯誤訊息就是示"Failed to send a test message using SMTP Service."。
從不同網段連到QNAP的管理web都正常,所以就覺得網路設定都沒問題。
後來就想用ssh連上QNAP,去ping在不同網段的mail server,卻是不通的,然後再執行route -n 顯示路由表時,卻沒有0.0.0.0的路由,這就妙了。
本來想直接用指令去加,但查到的指令route add default gw 192.168.24.1 br0有錯誤,所以就決定回管理web上看看是不是少設了什麼。
結果發現了一個東西,有一個系統預設閘道的設定,之前都沒去理它,後來進去這設定,在把gateway設定上去之後,回到ssh裡,route -n 顯示路由表時,就有0.0.0.0的路由,發送信件的功能也就正常了。
在AD查看被鎖定的帳號,用id 4776去撈出登入出敗的訊息,要找出是在哪台電腦做登入行為的。
結果在來源工作站的資訊,是一台沒看到的電腦名稱,也ping不到,覺得很奇怪。
就想到之前遇到來源工作站是空白的問題,那時就繼續在事件檢視器裡去找NTLM的log,可以找到相關的訊息。
這次也想說去NTLM裡面找找,就找到了,在NTLM裡記錄的登入失敗log裡,除了來源工作站,還多了一個安全通道名稱,這邊顯示的才是正確的電腦名稱。
至於為啥來源工作站是一個奇怪的名稱,目前也不知原因。
When checking the locked accounts in Active Directory, I used ID 4776 to retrieve the information about failed logins in order to determine the workstation where the login attempts originated.
The result showed an error in the workstation information, indicating a computer name that I couldn't find or ping, which seemed unusual.
I recalled a previous encounter where the workstation information was blank, so I continued searching for NTLM logs in the Event Viewer, as they often contain relevant details.
This time, I decided to check the NTLM logs and successfully found the failed login log. In addition to the workstation information, there was also a security channel name recorded. The computer name displayed in this section was the correct one.
As for why the workstation information appeared as a strange name, I am currently unaware of the underlying reason.
最近發現在透過chrome看一些線上課程影片時,影片會有聲音沒畫面。
win10的電腦都沒問題,只有win7的電腦會有這種狀況,所以排除影片本身的問題。
後來才發現竟是chrome裡面設定造成的,在win7電腦中,需要把chrome裡面有一個硬體加速的功能關閉,影片的畫面才能正常顯示。
No Video but Sound when Playing Online Videos in Chrome on Windows 7
Recently, I noticed that when using Chrome to watch online course videos, there would be sound but no video playback. This issue was specific to computers running Windows 7, as there were no problems on Windows 10 machines. Therefore, I ruled out any problems with the videos themselves.
Later, I discovered that the issue was actually caused by a setting within Chrome. On the Windows 7 computers, it was necessary to disable a feature called hardware acceleration in Chrome to enable proper video playback.
突然有幾台電腦的teams開啟都會有這個錯誤,無法使用。
重裝teams也沒用。
查了一下,原來是可轉發套件的問題,處理流程如下。
1. 移除teams,並把%appdata%底下teams相關的資料夾全刪除。
2. 移除電腦內所有的visual c++可轉發套件,然後重開機。
3. 安裝最新的2015to2022,visual c++可轉發套件。
4. 安裝teams。
之後就可以正常開啟了。
Teams JavaScript error: "The specified procedure could not be found."
Suddenly, several computers are experiencing this error when opening Teams, rendering it unusable.
Reinstalling Teams did not resolve the issue.
Upon investigation, it was discovered that the problem lies with the redistributable package. The following steps can be taken to address it:
Uninstall Teams and delete all related folders under "%appdata%".
Remove all Visual C++ redistributable packages from the computer and restart.
Install the latest version of the Visual C++ redistributable package (2015 to 2022).
Install Teams.
After following these steps, Teams should open without any errors.
outlook在編輯郵件時,要直接把圖貼在內文中,但貼上後,就是空白沒東西。
有時後在郵件的預覽內文視窗,在上下滾動畫面時,畫面也會很頓。
後來有查到,就是WIN10的DPI設定。
就是在解析度的設定上面,還有一個百分比可以調整畫面上字型與項目的大小,如果設定是超過100%,像是125%或150%時,就會造成在編輯郵件時的一些問題,只要調成100%,就可以排除這個怪問題,很奇特的一個問題。
There is nothing in the image pasted in the email while editing it in Outlook.
Sometimes, when scrolling up and down in the preview pane of the Outlook, the screen becomes sluggish. Later, it was found that it is due to the DPI (Dots Per Inch) settings in Windows 10. In the display settings, there is a percentage that can be adjusted to change the size of fonts and items on the screen. If the setting is above 100%, such as 125% or 150%, it can cause issues when editing emails. By adjusting it to 100%, this strange issue can be resolved.
為了想要定期把一些檔案壓縮成一個檔案,所以就想到要用batch加排程的方式。
7zip有提供相關的指令可以做
指令如下,
7z a d:\backup[%DATE:~0,4%-%DATE:~5,2%-%DATE:~8,2%].7z @d:\list.txt
第一欄(7z) - 就是執行程式的名稱,最好是用完整路徑
第二欄(a) - 就是要壓縮的意思
第三欄(d:\xxx) - 就是壓縮檔的名稱,上面的範例是檔名會自動產生當天的日期,後面的副檔名也可以改用zip
第四欄(@:xxx) - @後面要接一個文字檔,這個文字檔裡就列出要壓縮的檔案存放的路徑,所以有3個不同資料夾的檔案要壓在一起,就把三個路徑分三行存在文字檔裡就行了。
以上就是batch檔的內容。
7zip File Compression Command
In order to periodically compress files into a single archive, I decided to use batch scripting along with scheduled tasks. Fortunately, 7zip provides relevant commands to achieve this.
The command is as follows:
7z a d:\backup[%DATE:~0,4%-%DATE:~5,2%-%DATE:~8,2%].7z @d:\list.txt
Here is a breakdown of the command:
The first field (7z) represents the name of the executable program. It is recommended to use the full path to the program.
The second field (a) indicates the action of compressing.
The third field (d:\xxx) specifies the name of the compressed file. In the example above, the file name will be automatically generated based on the current date. You can also change the file extension to .zip if desired.
The fourth field (@:xxx) specifies a text file. This text file contains the paths of the files to be compressed. So, if you have files from three different folders that need to be compressed together, you can list the three paths on separate lines in the text file.
The above instructions can be included in a batch file to automate the process.
windows系統內建的提醒實在太小了,就縮在右下角,而且預設兩週前會天天提醒,到剩一週後,就不會在顯示了,使用者早就忘了,所以需要一個比較顯示的提示。
可以參考這個下列這個powershell,就可以執到此功能,裡面程式碼有夠多,但只要先把要搜尋的dc位置,mail server位置,管理者信箱這3個設定值,調成自己環境內的資訊,就可以執行測試了。
預設是測試模式,所以只會寄給管理者,測試ok後再關閉測試模式,通知信就會發給使用者了,不需要修改太多東西就可以用了,讚。
https://gist.github.com/meoso/3488ef8e9c77d2beccfd921f991faa64#file-example-com-password-expiration-notifications-ps1
Notifying Users of Expiring Passwords via Email in Active Directory
The default built-in password reminder in Windows is quite inconspicuous, residing in the bottom right corner. Additionally, it only displays reminders every day up to two weeks before the expiration date. Once there is only one week left, the reminder disappears, and users tend to forget about it. Therefore, a more prominent notification is needed.
You can refer to the following PowerShell script to achieve this functionality. Although the code may seem extensive, you only need to adjust three configuration values: the location of the domain controller (DC), the mail server, and the administrator's email address. Once you set them according to your environment, you can execute a test run.
By default, the script runs in test mode, sending notifications only to the administrator. After confirming that it works correctly, you can disable test mode, and the notifications will be sent to the users. It requires minimal modifications, making it easy to use.
You can find the PowerShell script at the following link:
https://gist.github.com/meoso/3488ef8e9c77d2beccfd921f991faa64#file-example-com-password-expiration-notifications-ps1