2022年5月29日 星期日

Python 資料比對-Excel篇

常常需要比對兩個修改前後的excel,資料一多很容易看得眼花撩亂
Python 資料比對
前言假如我們有兩個大型Excel(各四萬筆)要比對,要做三種資料(A∩B)、(A-A∩B)、(B-A∩B)那麼如果用excel篩選後複製貼上反覆操作後有錯誤風險且速度較慢,透過篩選複製貼上繁瑣且難發現有重複資料或是資料不全的項目,這一篇記錄了我去年前幫忙公務員解決的問題,想當初有公務員周期性的每個月需要做好幾筆,後來喝杯咖啡執行這程式資料就出來了輕鬆了不少呢 此篇使用的測試資料內容皆為亂掰的不是真

2019年1月9日 星期三

非對稱式路由與多個網路路徑(路由去回不同路)

https://docs.microsoft.com/zh-tw/azure/expressroute/expressroute-asymmetric-routing
Asymmetric routing with multiple network path
越來越多的網路環境不是單一出口,很常遇到因路由去回不同路,造成各式樣的網路不通問題,這篇說明算是蠻清楚的,雖然需要一點耐心且網路基礎,但至少把各細節都介紹。

當然各廠牌設備其實都有解決的方式。

  • 舉Fortigate例子

 config system settings
set asymroute enable
end
有vdom狀況下
config vdom
edit
config system settings
set asymroute enable
end
end
If you enable asymmetric routing, antivirus and intrusion prevention systems will not be effective. Your FortiGate unit will be unaware of connections and treat each packet individually. It will become a stateless firewall.


  • Key word : asymmetric routing

2018年8月10日 星期五

Configuration Change Notification and Logging

Configuration Change Notification and Logging

https://www.cisco.com/c/en/us/td/docs/ios-xml/ios/config-mgmt/configuration/15-sy/config-mgmt-15-sy-book/cm-config-logger.pdf

1.enable
2.configure terminal
3.archive
4.log config
5.logging enable
6.logging size entries
7.hidekeys
8.notify syslog
9.end

2017年2月13日 星期一

避免因 "重新整理網頁" (Reload Page) 造成資料重送


by Jamyy on 三月.20, 2008, under Coding

PHP 網頁達到以下目的
  1. 禁止返回上頁
  2. 避免因 "重新整理網頁" (Reload Page) 造成資料重送
PHP

 11<script language="JavaScript">
12    //讓 "回上頁不觸發 onload() 事件的瀏覽器" 也能 "禁止回上頁"
13    //Ref: http://www.boutell.com/newfaq/creating/backbutton.html
14    setTimeout("fn_forward()",1);
15    function fn_forward() {
16        history.forward();
17        setTimeout("fn_forward()",1);
18    }
19</script>
20</head>
21<body onload="history.go(1);fn_forward();">

"history.go(1);fn_forward();">




"history.go(1);fn_forward();">

2017年2月8日 星期三

Windows Security Auditing

https://technet.microsoft.com/en-us/library/79fe2474-6cdd-4411-8aee-20f9520ff3c8

Security Auditing

Updated: January 25, 2010
Applies To: Windows Server 2008, Windows Server 2008 R2
This navigation topic for the IT professional describes the documentation available to plan, implement, and monitor events by using features found in Windows Security Auditing.
Security auditing is one of the most powerful tools that you can use to maintain the security of your system. As part of your overall security strategy, you should determine the level of auditing that is appropriate for your environment. Auditing should identify attacks (successful or not) that pose a threat to your network, and attacks against resources that you have determined to be valuable in your risk assessment.
noteNote
Windows Security Auditing documentation has been republished to include additional versions of Windows. For updated information and links to current topics, see Security Auditing Overview.

  • Advanced Security Auditing Walkthrough

    This step-by-step guide uses Windows Server 2008 R2 and Windows 7 to demonstrate the process of setting up an advanced audit policies infrastructure in a test environment. During this process, you will create an Active Directory domain, install Windows Server 2008 R2 on a member server, install Windows 7 on a client computer, and configure two advanced audit policies.
  • Advanced Security Auditing FAQ

    This topic lists common questions and their answers about understanding, deploying, and managing security audit policies.
  • Which Editions of Windows Support Advanced Audit Policy Configuration

    This topic provides information about the versions of Windows that support advanced audit policy configuration, in addition to special considerations that apply to various tasks associated with auditing enhancements.

  • Planning and Deploying Advanced Security Audit Policies

    This topic explains the options that security policy planners must consider and the tasks they must complete to deploy an effective security audit policy in a network. Advanced security audit policies were introduced in Windows 7 and Windows Server 2008 R2, but they also apply to other versions. This topic also lists the supported versions.

  • Auditpol

    This topic provides syntax and examples for using the Auditpol command-line tool. Auditpol can be used to display information about audit policies and to perform functions to manipulate them.

2016年3月7日 星期一

哪一個Shell環境?

處理/etc/rc與.cronrc檔案時,如果不使用Bourne shell的話,會產生一些問題,因為這兩個檔案一定得用Bourne shell來處理。

From "Wicked Cool Shell Scripts"
http://www.intuitive.com/wicked/index.shtml


2016年3月5日 星期六

用自己喜歡的bash色彩


想要修改成自己"甲意"的bash環境很easy
切換到自己的家目錄 cd~
打開家目錄下的隱藏檔 .bashrc
把以下的文字貼到最後一行


export PS1="\[\033[38;5;11m\]\u\[$(tput sgr0)\]\[\033[38;5;15m\]@\h:\[$(tput sgr0)\]\[\033[38;5;6m\][\w]:\[$(tput sgr0)\]\[\033[38;5;15m\] \[$(tput sgr0)\]"
重啟Terminal後就會套用

有個網站專門讓你自製~很直覺
http://bashrcgenerator.com/

熱門文章