MathJax support for rendering equations

MathJax support for rendering equations

If I’m going to occasionally write posts about math (and that is the plan), I need the ability to render equations. It’s not a strict necessity; you can get pretty far by literally describing what it is that you’re trying to say. For example:
The Riemannian gradient over the compact Stiefel manifold of the Rayleigh quotient with respect to some square matrix and a given conformal subspace can be computed as the orthogonal complement with respect to a basis for that subspace of the product of said matrix and said basis.
However, though it may not be worth a thousand words, an equation in this case is worth approximately fifty words:

$$\nabla\ \textrm{RQ}_A(\textrm{colspan}(V)) = (I – VV^T)AV$$

Or, appropriately rendered:
∇ RQA(colspan(V))=(I−VVT)AV
∇ RQA(colspan(V))=(I−VVT)AV
Fortunately, there are more solutions for this than the last time I looked (approximately ten years ago). And if you Google “math, latex and hugo” (as I did), you find the following on the official Hugo website: MathJax support in Hugo.
And so, because I’m a fan of test-driven development, I wrote up this post with a little math (i.e., the block math above) and this inline SVD here: Avi=uiσiAvi=uiσi. And because I hadn’t gone through the steps in the post above, it looked like shit (i.e., the test failed):

This post before MathJax support
But when you add in the steps from the article to add MathJax support to all pages (e.g., in the footer), it’s mostly good. My text editor (vim) still doesn’t understand the LaTeX subscript underscores in the markdown files:

Vim thinks this is bad markdown
But I can deal with that in a few ways: ignore it, or tell vim not to do syntax highlighting on markdown files (set filetype). I’ll update this post if I find a better solution. But in the meantime, I don’t have any excuse not to do math posts.
Update: MathJax pops up obnoxious loading/processing messages in the browser while it is loading. You can disable this by setting messageStyle to ‘none’, like so:

MathJax.Hub.Config({
messageStyle: ‘none’,
showProcessingMessages: false,
tex2jax: {
// tex2jax config…
}
});

Talks by Jake VanderPlas

Talks by Jake VanderPlas

Speaker Deck

Search…
Sign Up
Sign In
Talks by Jake VanderPlas

Thumb_slide_0
Promoting Open Science in the University (OSBD 2016)

Dec 5, 2016 by Jake VanderPlas

Thumb_slide_0
Visualization in Python with Altair

Nov 9, 2016 by Jake VanderPlas

Slide 26Slide 25Slide 24Slide 23Slide 22Slide 21Slide 20Slide 19Slide 18Slide 17Slide 16Slide 15Slide 14Slide 13Slide 12Slide 11Slide 10Slide 9Slide 8Slide 7Slide 6Slide 5Slide 4Slide 3Slide 2Thumb_slide_0
Altair: Declarative Visualization in Python (DSE Summit 2016)

Oct 26, 2016 by Jake VanderPlas

Slide 62Slide 61Slide 60Slide 59Slide 58Slide 57Slide 56Slide 55Slide 54Slide 53Slide 52Slide 51Slide 50Slide 49Slide 48Slide 47Slide 46Slide 45Slide 44Slide 43Slide 42Slide 41Slide 40Slide 39Slide 38Slide 37Slide 36Slide 35Slide 34Slide 33Slide 32Slide 31Slide 30Slide 29Slide 28Slide 27Slide 26Slide 25Slide 24Slide 23Slide 22Slide 21Slide 20Slide 19Slide 18Slide 17Slide 16Slide 15Slide 14Slide 13Slide 12Slide 11Slide 10Slide 9Slide 8Slide 7Slide 6Slide 5Slide 4Slide 3Slide 2Thumb_slide_0
Python’s Data Science Stack (JSM 2016)

Jul 31, 2016 by Jake VanderPlas

Thumb_slide_0
Statistics for Hackers

May 31, 2016 by Jake VanderPlas

Slide 29Slide 28Slide 27Slide 26Slide 25Slide 24Slide 23Slide 22Slide 21Slide 20Slide 19Slide 18Slide 17Slide 16Slide 15Slide 14Slide 13Slide 12Slide 11Slide 10Slide 9Slide 8Slide 7Slide 6Slide 5Slide 4Slide 3Slide 2Thumb_slide_0
In Defense of Extreme Openness

Mar 22, 2016 by Jake VanderPlas

Thumb_slide_0
Astrostatistics: Opening the Black Box

Nov 11, 2015 by Jake VanderPlas

Slide 43Slide 42Slide 41Slide 40Slide 39Slide 38Slide 37Slide 36Slide 35Slide 34Slide 33Slide 32Slide 31Slide 30Slide 29Slide 28Slide 27Slide 26Slide 25Slide 24Slide 23Slide 22Slide 21Slide 20Slide 19Slide 18Slide 17Slide 16Slide 15Slide 14Slide 13Slide 12Slide 11Slide 10Slide 9Slide 8Slide 7Slide 6Slide 5Slide 4Slide 3Slide 2Thumb_slide_0
The eScience Institute: Data Science at UW

Jul 25, 2015 by Jake VanderPlas

Thumb_slide_0
The State of the Stack (SciPy 2015 Keynote)

Jul 10, 2015 by Jake VanderPlas

Thumb_slide_0
Periodograms for Multiband Timeseries

Jun 3, 2015 by Jake VanderPlas

Thumb_slide_0
Losing Your Loops: Fast Numerical Computing with NumPy (PyCon 2015)

Apr 10, 2015 by Jake VanderPlas

Slide 11Slide 10Slide 9Slide 8Slide 7Slide 6Slide 5Slide 4Slide 2Thumb_slide_0
Copy-left and Copy-right

Jan 6, 2015 by Jake VanderPlas

Thumb_slide_0
Frequentism and Bayesianism: What’s the Big Deal? (SciPy 2014)

Jul 8, 2014 by Jake VanderPlas

Thumb_slide_0
Unlocking the Universe with Python and LSST

Oct 13, 2013 by Jake VanderPlas

Speaker Details

56c4053438af8e8b90d6f53cbb7573be?s=47
Jake VanderPlas

Jake VanderPlas is a Senior Data Science Fellow at the University of Washington’s eScience Institute, which supports data-intensive research across disciplines at UW.

InvertocatCopyright © 2017 GitHub Inc.
All slide content and descriptions are owned by their creators.
F.A.Q. Terms of Service Privacy Policy

Mitnick: How to go invisible

Mitnick: How to go invisible

Advertisement.

Skip Article Header. Skip to: Start of Article.

FAMED HACKER KEVIN MITNICK SHOWS YOU HOW TO GO INVISIBLE ONLINE

Skip Comments. Skip to: Footer.VIEW COMMENTS

https://disqus.com/embed/comments/?base=default&f=wired&t_i=2163032%20https%3A%2F%2Fwww.wired.com%2F%3Fp%3D2163032&t_u=https%3A%2F%2Fwww.wired.com%2F2017%2F02%2Ffamed-hacker-kevin-mitnick-shows-go-invisible-online%2F&t_e=Famed%20Hacker%20Kevin%20Mitnick%20Shows%20You%20How%20to%20Go%20Invisible%20Online&t_d=%09%09%09%09%09%09Famed%20Hacker%20Kevin%20Mitnick%20Shows%20You%20How%20to%20Go%20Invisible%20Online%09%09%09%09%09&t_t=Famed%20Hacker%20Kevin%20Mitnick%20Shows%20You%20How%20to%20Go%20Invisible%20Online&s_o=default&l=#version=b7f46100e05d90b78b65ac991aa5a1c9

Milian Wolff

Milian Wolff

My name is Milian Wolff and I’m from Berlin, Germany and was born on August 19th 1988. I studied physics at the FU-Berlin and work for KDAB as a software engineer.

On this website I’m writing about programming, open source software, KDE, Linux, web development and other computer related topics.
Make sure you check out my projects and take a look into the Code Snippets section.

One appeal to any native speaker out there: If I write crappy English (which would not suprise since German is my first language) please correct me by writing an email.

My Projects
You can find some of my projects on GitHub.
KDevelop
I’m currently the co-maintainer of KDevelop. I maintain many plugins, like snippets, external scripts, the generic project manager and of course the C++ and PHP language plugins. But my patches for bug fixes span across the whole codebase and especially for performance improvements I dug into even the darkest corners.
PHP Plugin for KDevelop 4
In December 2008 I started contributing to the PHP plugin for the KDE4 version of KDevelop. My vision is a state-of-the-art plugin with support for language introspection, on-the-fly validation, auto-completion, refactoring, code generation and semantic highlighting. It’s a work in progress which already has quite some very nice features. You can follow its development via GIT or take a look at our feature plan for Quanta 4.
Massif Visualizer
Good visualizing of data is in my opinion one of the most important aspects nowadays. Just as well one should always try to polish apps as good as possible, esp. in regard to performance. Hence I wrote this application to visualize data of Massif logs, making it possible to analyze memory consumption fast and easily.
heaptrack
For years I planned to somehow write something faster than Massif for heap memory profiling. In 2014, I finally scratched that itch and created heaptrack. It is a tool that is both faster as Massif and also gives you much more data as well. Try it out!
Qalculate! Backend for Cantor
I’m a pretty big fan of Qalculate!, a library for advanced calculators. Especially it’s support for units helped me a lot as a Physics student. There are official UIs for GTK, KDE3 and a CLI app, yet until end of 2009 no KDE 4 interfaces was on the horizon. Given that Cantor got moved to KDE Edu, I decided to try and write a backend for it. Martin Kuettler since took over, and the backend is shaping up nicely.
Download script for SpringerLink ebooks
I’ve written a script which simplifies the process of downloading ebooks from SpringerLink.com. It started as a Bash Script and was rewritten in Python since. It is recommended to use the Python version if possible. The script downloads all chapters of a book and merges them into one PDF-file.
KTextEditor Linter Plugin
I wrote a plugin for KTextEditor which supplies Kate and Kwrite among others with basic syntax checking.
Markdownify
This neat little PHP class lets you convert HTML into Markdown. It is the successor to html2text.php and comes now with a much improved design and by far more stable conversions. It enables you to write your texts in either HTML or markdown and swap at any time!
Why that’s important? Because that way you can save your contents in one format. Content editors can then choose their input formatting of choice. Be it Markdown or HTML. Additionally your server doesn’t need to create HTML out of Markdown for each and every page impression. This saves time and resources!
Typogridder
A little javascript bookmarklet to display a typographic baseline grid. More information can be found on the project site.
Other projects I participated in
The good thing about open source is that everybody is allowed to improve existing code. I frequently do so if the piece of software uses a language I’m confident in – i.e. PHP. Following is a list of projects I wrote patches for:
GeSHi
I got involved in GeSHi around the release of version 1.0.7.21 and started to write patches which resulted in an increased performance. Now I also add new features, fix bugs and will help out with the upcoming 1.2 series.
Drupal modules
When I started using Drupal 6 for this website some – for me – crucial modules had not yet been ported. So I stepped in and started to port:
Spam
Filter by Node Type
I have also filed patches for a bunch of other modules:
Get Content Type
Geshifilter
Marksmarty
list of minor participations
I wrote the shell engine for PEAR Text_Diff
I translated the jQuery datepicker to German and fixed a bug inside jQuery itself
patched a thing or two for PHP Markdown
This Blog and all Code Snippets are licensed under a Creative Commons Attribution 4.0 License.
Milianw.de by Milian Wolff, powerd by Drupal. This page should be valid XHTML 1.0 strict and valid css.

Rusty Russell: Transcript: My 20-Year Journey from Linux to Bitcoin

Rusty Russell: Transcript: My 20-Year Journey from Linux to Bitcoin

I delivered this at TEDx Adelaide late last year, you can find the video online https://www.youtube.com/watch?v=HrCKFd5vTpM
I work on the infrastructure; the low-level computer code that other code uses to do useful things. I give away all of the code that I write, and I’ve been paid to do that for almost 20 years now.

It started back at University; a friend and I downloaded this new Operating System called Linux onto a pile of floppy disks. Sorry, I see someone, young person in the audience, confused [laughter]. A floppy disk is like a … imagine a crappy USB key, put into a case that’s shaped like a 3-d printed save icon [laughter].

Now Linux was Open Source, a community-produced program that was supposed to be like the program that ran the big computers at University, only this ran on a home PC, and was free.

…clearly, amateurs can’t compete with multi-billion-dollar companies. The real world doesn’t work that way, does it?

On my PC at least, it sucked; it was very slow and buggy. So clearly, clearly, a community of volunteers — amateurs — can’t be expected to produce something to compete with well-paid professionals at multi-billion-dollar companies. And even if they did produce something interesting, without the sales and marketing budget: the real world doesn’t work that way, does it?
So five years later 1997, I ran Linux on my laptop, sure, but none of my clients ran Linux. And I go to this international computing conference. And at that conference were all the key Linux developers, and I heard them talk about their community tackling some really really difficult technical challenges and that’s what I wanted to do. And as a group they were, and still are, the brightest bunch of programmers I have ever met.

So when I got home, I started working on a new part of Linux in my spare time. That same year, it got accepted into Linux, and I kept updating it, collaborating with a growing community of programmers from around the world. The next year, I found a company to sponsor me, so that I could write the next version full time: paid to release all my code for free.

[SLIDE: graph of NASDAQ rising] Now, this was the height of the dot com boom. If you could write a web page, you could get venture capital funding. If you could put an “e” at the front and a “.com” at the end, you could get twice that! [laughter] A lot of these companies used Linux, so Linux was hot. I joined a Linux startup. My friends at another Linux startup had their initial public offering in 1999 with the stock ticker LNUX. And they offered stock at the initial price of $30 to members of the community, and I was one.
On the very first day their stock jumped from $30 to $320: the largest first-day increase in the history of the NASDAQ. But don’t worry, I am not going to let my spectacular new wealth change me! [SLIDE: NASDAQ dropping] [laughter]

If you look up “dot com boom” on Wikipedia, it redirects you to “dot com bubble”. And pop it did. Those Linux companies evaporated. My company laid everyone off. That stock was worth less than I paid for it. And the newspaper articles changed from “Linux is the future” to basically, “Linux is dead”.

See, in 1998, people started asking: “when is Linux going to compete with Microsoft Windows?” “Will 1999 be the Year of the Linux Desktop?” 2000? 2001? … 2016?

Anyway, in 2001 I got another job working on Linux, there was still so much technical challenge, so much to do. But the spotlight had moved on: the rock star days were over.

In 2001 the Linux rock star days were over.

I’m going to pause my Linux story at this point, 15 years in the past, to talk about a second technology.

In 1977, the invention of the digital signature. Now, what this is, is you make a 40-digit, secret number, and you take this number, and a document, and MATH MATH produce another huge number that no one else could have made. And I can take that huge number you’ve produced, and the document, and MATH MATH prove that the only person that could have made that [huge number] is someone holding your secret, ie. you. That huge unforgeable number a called digital signature.

Now first thing to do when you invent something like a digital signature is try to make money. No, no I mean literally, try to make electronic cash. Right so the bank has a secret number and it signs this document to say “this is worth 10 bucks” and I can take the bank’s signature and the document and email it to you and you can check that “yep, it’s worth 10 bucks, the bank said so”. Of course, I can also email it to you [points to another person]. And this is called the double-spend problem. It’s also the triple, or the million-spend problem. See, signed documents are great, but I can just copy the whole thing including the signature.

The double-spend problem: signed documents are great, but I can just copy the whole thing including the signature.

Now we can fix this: if every time you send me money, I ask the bank “has she sent this to anyone else?” and it signs to say that “no, it’s now transferred it’s now yours”. But that’s not really digital cash, that’s a digital bank account.

In the nineties, a company came along with something of an innovation. Their “digital bank” would yes, check and sign that no, this had not been spent twice, but, using MATH MATH MATH MATH, the bank didn’t know exactly which note it was signing. This gave you back your privacy, this blinded signature. People started to get excited about the possibility of electronic cash.

In 1998 that company folded. Without their server to check whether something had been spent twice, the money was useless.
It was a full ten years before somebody calling themselves “Satoshi Nakamoto” published a nine page paper which described a computer network which could check for double spends without a central authority. As long as at least half the network was honest, nobody could spend twice.

When Digicash folded, their money was useless. “Satoshi Nakamoto” described a computer network *without a central authority*.
Of course the question remained: would anyone trust currency backed by nothing more than math and a network of computers? By the end of 2013 the answer was a definitive YES, with the world’s largest bitcoin exchange, the Japanese Mt. Gox, valuing each bitcoin at over 1100 US dollars, up from $30 two years before. [SLIDE: bitcoin price rising] But don’t worry, I’m not going to let my sudden and superb wealth change me! [SLIDE: bitcoin price dropping] [laughter]

In February, 2014, Mt Gox suspended bitcoin withdrawals. Then they suspended trading. Then they filed for backruptcy. Incompetence, theft, hacks, fraud, insider trading, or all of the above. The bitcoin price plummeted. Bitcoin was dead.

Clearly, clearly, no bunch of volunteers can produce something which can compete with professionals at multi-billion companies, and even if they did produce something, without a marketing and sales budget, well the real…

Let me pause that there. And go back to my Linux story. Because an interesting thing has happened in the last 15 years. When you take out your phone and pull up a web page, the machine that sent you that web page is probably running Linux. Of the 500 fastest supercomputers in the world, 497 of them Linux. And Linux is in over one billion phones at the heart of Android. Instead of winning the desktop, we won everywhere else.

…but in the last 15 years Linux, instead of winning the desktop, we won *everywhere else*. And that’s why I started working on Bitcoin.
And that’s why last year I left my comfortable big company job working on Linux where I’d been for 12 years, and I started working full-time in the Bitcoin community.

And so people ask me “So Rusty, is bitcoin going to replace Visa and Mastercard?” “Is it going to replace the US dollar as the world’s reserve currency?” Well, I can stand here with twenty years of experience in disruptive communities and I can give you an iron-clad guarantee that I do not know [laughter]. But yesterday I took my phone, with Linux at its heart, software that I have written over the last twenty years, and I walked into a newsagency here in Adelaide, and in a couple of minutes I bought some bitcoin with it. So I think I can promise you that the next two decades are going to be at least as much of an exciting adventure as the last two.
Thank you.