This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Free books by Springer with categories | |
Thanks to Springer for making these available. | |
See announcement: | |
https://www.springernature.com/gp/librarians/news-events/all-news-articles/industry-news-initiatives/free-access-to-textbooks-for-institutions-affected-by-coronaviru/17855960 | |
Thanks to Harish Narayanan for the categories. | |
See announcement: | |
https://hnarayanan.github.io/springer-books/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Extended python -m http.serve with --username and --password parameters for | |
# basic auth, based on https://gist.github.com/fxsjy/5465353 | |
from functools import partial | |
from http.server import SimpleHTTPRequestHandler, test | |
import base64 | |
import os | |
class AuthHTTPRequestHandler(SimpleHTTPRequestHandler): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/gui_gtk_x11.c b/src/gui_gtk_x11.c | |
index 97ad6b0..e03295c 100644 | |
--- a/src/gui_gtk_x11.c | |
+++ b/src/gui_gtk_x11.c | |
@@ -2946,6 +2946,29 @@ on_select_tab( | |
} | |
/* | |
+ * Handle reordering the tabs (using D&D). | |
+ */ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Buffett bought PetroChina from 2002 to 2003. The first time we see PetroChina shows up is in 2003 annual letter. | |
source: http://www.berkshirehathaway.com/letters/2003ltr.pdf | |
From the letter we know that Buffett paid $488 million dollars for 1.3% of PetroChina. We didn't see any discussion on this position until Buffett talked about its sale at 2007 letter. Buffett did something unusual, he gave us a glimpse of his valuation for PetroChina. | |
Source: http://www.berkshirehathaway.com/letters/2007ltr.pdf | |
Let's calculate the average price Buffett paid: | |
according to PetroChina's 2004 annual report: http://www.petrochina.com.cn/resource/EngPdf/2004ndyj_eng.pdf | |
There are 175.82 billion shares outstanding. 1.3% of that is 2,285,660,000 shares. Buffett probably bought the ADR (ticker PTR trading in US). One ADR = 100 HK share, so he paid $488 million for about 22.8566 million shares of PTR, or $21.35 per share. | |
Back then, Buffett and Charlie valued PetroChina's intrinsic value at $100 billion, or about $56.88 per sha |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function mycd() | |
{ | |
#if this directory is writable then write to directory-based history file | |
#otherwise write history in the usual home-based history file | |
tmpDir=$PWD | |
echo "#"`date '+%s'` >> $HISTFILE | |
echo $USER' has exited '$PWD' for '$@ >> $HISTFILE | |
builtin cd "$@" # do actual cd | |
if [ -w $PWD ]; then export HISTFILE="$PWD/.dir_bash_history"; touch $HISTFILE; chmod --silent 777 $HISTFILE; | |
else export HISTFILE="$HOME/.bash_history"; |