原创 Traffic Analysis of an SSL/TLS Session

In this post I want to show what happens at the protocol level when we use SSL/TLS. For the purpose of this analysis I’l

原创 無屏幕和鍵盤配置樹莓派WiFi和SSH

不算是什麼新功能了,在樹莓派3B發佈後不久,樹莓派官方 Raspbian 系統久加入了允許在開機前對 WiFi 網絡進行配置的機制。一、WiFi 網絡配置用戶可以在未啓動樹莓派的狀態下單獨修改 /boot/wpa_supplicant.co

原创 Understanding Python Decorators in 12 Easy Steps!!

Ok, perhaps I jest. As a Python instructor, understanding decorators is a topic I find students consistently struggle wi

原创 Unicode 和 UTF-8 有何區別

簡單來說:Unicode 是「字符集」UTF-8 是「編碼規則」其中:字符集:爲每一個「字符」分配一個唯一的 ID(學名爲碼位 / 碼點 / Code Point)編碼規則:將「碼位」轉換爲字節序列的規則(編碼/解碼 可以理解爲 加密/解密

原创 正則表達式筆記

Table: literal: 普通的逐字匹配."|": 該操作符具有延伸性(貪婪),例: at|home 匹配的是at或home,而不是t或h.'.': 任意一個字符(不含\n)"^": 匹配字符串起始部分"$": 匹配字符串結束部分""

原创 Mac OS光標快捷鍵

常用的快捷鍵: Ctrl + d        刪除一個字符,相當於通常的Delete鍵(命令行若無所有字符,則相當於exit;處理多行標準輸入時也表示eof) Ctrl + h        退格刪除一個字符,相當於通常的Backspac

原创 Apple iOS Clients: 'Unable to join the network'

Most Apple iOS devices have issues moving from one wlan to another on the same Cisco WLC with the default ‘fast ssid cha

原创 VIM自動補齊括號和引號

在~/.vimrc文件中追加以下內容: inoremap ( ()<ESC>iinoremap [ []<ESC>iinoremap { {}<ESC>iinoremap < <><ESC>iinoremap ' ''<ESC>iinore

原创 Python 裝飾器

原文出處: 田小計劃   裝飾模式有很多經典的使用場景,例如插入日誌、性能測試、事務處理等等,有了裝飾器,就可以提取大量函數中與本身功能無關的類似代碼,從而達到代碼重用的目的。下面就一步步看看Python中的裝飾器。一個簡單的需求現在有一個

原创 have sb do / have sb doing / have sth dong 區別

have sb do have sb doing have sb done 三者有什麼區別? 像have sb ……這類多種形式的對於have sth ……有麼?如果有,有什麼區分? 答:have sth. done,have sb. do

原创 whether用法

whether意爲“是否;不管……(還是……)”,表示遲疑或兩個可能性之間的選擇。whether有以下三種常見表達: (1) whether to do sth. 意爲“是否……” (2) whether ... or ... 意爲“是……

原创 python的sorted函數對字典按key排序和按value排序

1.sorted函數按key值對字典排序    先來基本介紹一下sorted函數,sorted(iterable,key,reverse),sorted一共有iterable,key,reverse這三個參數。    其中iterable表

原创 Python調用REST API接口的幾種方式

本文主要介紹python中調用REST API的幾種方式,下面是python中會用到的庫。- urllib2- httplib2- pycurl- requests urllib2- Sample112345678910import url

原创 CentOS7安裝Python3

IntroductionPython is a versatile programming language that can be used for many different programming projects. First p

原创 Install And Use Shadowsocks Command Line Client on Linux

In a previous post, I showed you how to build a shadowsocks server on your own server and install the client software on