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
$ time LC_COLLATE=C echo "why?" | |
why? | |
real 0m0.000s | |
user 0m0.000s | |
sys 0m0.000s |
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
en_res=$(echo $(cat some_en.txt EN | gzip | wc -c) - $(gzip -c EN | wc -c) | bc); \ | |
de_res=$(echo $(cat some_en.txt DE | gzip | wc -c) - $(gzip -c DE | wc -c) | bc); \ | |
(echo $en_res EN && echo $de_res DE) | sort -n | head -1 | cut -d' ' -f2 |
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
echo "A very hard, brittle, silvery-white transition metal of the platinum family, iridium is the second-densest element (after osmium) and is the most corrosion-resistant metal, even at temperatures as high as 2000 °C. Although only certain molten salts and halogens are corrosive to solid iridium, finely divided iridium dust is much more reactive and can be flammable. Iridium was discovered in 1803 among insoluble impurities in natural platinum. Smithson Tennant, the primary discoverer, named the iridium for the goddess Iris, personification of the rainbow, because of the striking and diverse colors of its salts. Iridium is one of the rarest elements in the Earth's crust, with annual production and consumption of only three tonnes." > some_en.txt |
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
echo "Iridium ist ein chemisches Element mit dem Symbol Ir und der Ordnungszahl 77. Es zählt zu den Übergangsmetallen, im Periodensystem steht es in der Gruppe 9 (in der älteren Zählung Teil der 8. Nebengruppe) oder Cobaltgruppe. Das sehr schwere, harte, spröde, silber-weiß glänzende Edelmetall aus der Gruppe der Platinmetalle gilt als das korrosionsbeständigste Element. Unter 0,11 Kelvin wechselt es in den supraleitfähigen Zustand über." > some_de.txt |
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
en_res=$(echo $(cat some_de.txt EN | gzip | wc -c) - $(gzip -c EN | wc -c) | bc); \ | |
de_res=$(echo $(cat some_de.txt DE | gzip | wc -c) - $(gzip -c DE | wc -c) | bc); \ | |
(echo $en_res EN && echo $de_res DE) | sort -n | head -1 | cut -d' ' -f2 |
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
wget http://www.gutenberg.org/ebooks/46.txt.utf8 && mv 46.txt.utf8 EN && wget http://www.gutenberg.org/cache/epub/2229/pg2229.txt && mv pg2229.txt DE |
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
(echo `cat some_de.txt EN | gzip | wc -c` EN; \ | |
echo `cat some_de.txt DE | gzip | wc -c` DE) \ | |
| sort -n | head -1 |
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
(defun subtract-number-from-current-word (number) | |
"Substract a number from the current word and replace it with the result. | |
Beware: No error checking." | |
(interactive "p") | |
(let ((curr-word (current-word))) | |
(kill-word 1) | |
(insert (int-to-string | |
(- (string-to-int curr-word) number))))) |
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
Public Sub CreateBubbleChart() | |
''' Reference : Tom Hollander, http://blogs.msdn.com/b/tomholl/archive/2011/03/28/creating-multi-series-bubble-charts-in-excel.aspx | |
If (Selection.Columns.Count <> 4 Or Selection.Rows.Count < 3) Then | |
MsgBox "Selection must have 4 columns and at least 2 rows" | |
Exit Sub | |
End If | |
Dim bubbleChart As ChartObject | |
Set bubbleChart = ActiveSheet.ChartObjects.Add(Left:=Selection.Left, Width:=600, Top:=Selection.Top, Height:=400) | |
bubbleChart.Chart.ChartType = xlBubble |
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
(defun number-of-days-between-dates (date1 date2) | |
"Returns the number of days between two dates. | |
Usage: | |
(number-of-days-between-dates \"yyyy-mm-dd\" \"yyyy-mm-dd\") | |
Or | |
M-x number-of-days-between-dates" |