Menu
+

About Get Support

Yearly archives "2017"

5 Articles

Logging the Read Books

Alternative title: Blogging the Red Books

While reading this, I though, “Why not?” Here’s a list of in-progress books and other books/writings I’ve come across in the past that I simply should share with the whole world wide web. Not being a fan of 3rd party tools that harvest and conveniently classify your information, here is a good enough place to put it for anyone who cares enough to know what is on my mind.

In progress:

The Psychology of Reading
Insup Taylor and M. Martin Taylor
ISBN: 0-12-684080-6

I got lucky and found a hard-copy of this book for 3 dollars 2 years ago. It’s been sitting in my shelf that whole time and afterwards I’ve been using it as a stand because the hard cover binding was the perfect width for one of my projects. I purchased it just to read a few sections that caught my attention when I first looked through it, but when I actually started reading it from the start it seemed to me to be something very fundamental. I read somewhere (probably this book) that language shapes the way you think, and this book goes over not only roman based languages but also the ones form the Eastern world. I warn people never to trust a biology book that was published more than 10 years ago, and physiology is applied biology. So, I don’t know. This version was published in 1983, way before I was born. I’m sure there’s going to be some outdated information (or even entire theories), so I should keep reading it with the idea that some of the stuff in it might not be true anymore.

Reading wish-list:

n/a

Read:

The Information: A History, a Theory, a Flood
James Gleick
ISBN-13: 978-0375423727

It’s a simple enough read, but it’s structured on themes more than it is chronologically. For example, he keeps referencing back to Shannon in almost every other chapter, but I guess a person can’t write a book about information without mentioning his work. Geick’s limits himself to the decimal definition of a kilobyte and ignores the binary definition of 1024 bytes. This leads me to believe he would also be the type to pronounce gif as jif. But really, it shows how in depth he gets into the technical subjects. The section on qubits was elementary at best, and I assume he included it in the book mainly to claim full coverage. Upon finishing, I couldn’t really figure out what the thesis was to this book. Was it about information overflow? The epilogue sorta left me hanging. I learned plenty on the history side but not so much on the theory side. The flood portion seems rushed at the end. Unless I missed something, Geick seems to have really just dedicated one chapter to it. History was the stronger side of this book.

X is just another way for Y to make more of X
#bookSelfie


 

I don’t mean to be bias with the stuff I post here, but I found that the best books I’ve gone through were the one’s written by folks with Ph.Ds. Maybe it’s because they’re experts on the topics they write on, or because they’ve had 100’s of hours just doing what “writing” is. Therefore, they portray their ideas better than the layman. I don’t even want to give mention to the worst books I’ve come across mostly due to embarrassment of proclaiming I’ve picked them up once upon a time, but you don’t always know that until after you’re more than half-way through the book. We shouldn’t propagate bad ideas, but at the same time we shouldn’t block ourselves from ideas/thoughts we disagree with. It’s a struggle.

To be updated..

Back to the Basics: Crayon, wp-LaTex, and vimWiki

Before I forget, I should review some of the basics.

So, this is a blog, and having your own blog requires some maintenance. It’s like owning a house except the servers are hosted in Arizona, the domain name is registered in France, and I guess you’re not owning said house. You’re renting hardware space in someone else’s basement.. Note where your local and remote machines are. Okay, so I need to remember how to bash function. How to bash function? No, how about just a bash alias?

alias alias_name="commandToRun"

while we’re at it

alias maketotaldestroy='sudo halt -p'

but the alias needs to be remembered after reboots

cd ~/
ls -la
vim .bash_aliases

include in file, continue with life.

source ~/.bash_aliases

So with this, instead of memorizing a very long username + host domain I can access my blog with only a few magic words.

alias sshblog='ssh forgettableLongName@ridiculouslyLongRemoteHostName.net'

.. checkmate. I guess we could include the password as an argument but, no. So long as remote and host have authenticated each other before, this ought to be enough.

Now, without needing to activate FTP we can update and modify everything in the blog via command line. Will need WP-CLI. Fortunately the freebsd log files kept track of the commands I issued to it oh so many seasons ago, so simply pressing the up arrow key and holding it for a minute or two sent me to the keystrokes. the magic keywords are simply:

wp help
wp help core
wp core check-update
wp core update
wp core update-db
wp core verify-checksums

wp help plugin
wp plugin update --all
wp plugin uninstall akismet
wp plugin uninstall hello

remove/deactivated unneeded plugins which could become hazardous to your health. For more information these functions have been well documented at http://wp-cli.org/docs/ or simply refer to the man pages

How to syntax on wp?

since we’re going to be typing code here and there, a nice plug-in to have is:
https://wordpress.org/plugins/crayon-syntax-highlighter/

from here we can simply dl to our own machine or even use SSH from the remote machine to dl the file from a selected URL https://downloads.wordpress.org/plugin/crayon-syntax-highlighter.zip and then save it to the remote machine’s plugin directory, then..

via wp-cli
search for “crayon” to get a list of plugins already available through official channels

wp plugin search crayon
wp plugin install crayon-syntax-highlighter
wp plugin activate crayon-syntax-highlighter

So now we have pretty colors that support languages beyond what the regular vanilla wordpress supports. you could also git clone or wget + unzip from https://github.com/aramk/crayon-syntax-highlighter.git to get the same affect, but we’re already using wp-cli to run an update so might as do it from the remote host.

Next order of business: LaTeX.. how to LaTeX?

simply typing in:

$latex i\hbar\frac{\partial}{\partial t}\left|\Psi(t)\right>=H\left|\Psi(t)\right>$

should produce:

$latex i\hbar\frac{\partial}{\partial t}\left|\Psi(t)\right>=H\left|\Psi(t)\right> $

Unfortunately, I won’t get to see it until I preview it on the wordpress had it even worked to begin with. Apparently a viable plugin would need access to a latex server in order to generate some sort of image. It could be a .png and there’s even one that generates .svg vector images, but it pings to some guy’s web basement server and I’d rather not have my blog reliant on whether or not some random guy forgot to pay their electric bill. Of course, there’s always the option to self host a latex server on my own or a remote machine. A search for latex on the plugin menu yields several attempts at doing this.

While searching, I discovered an old .png generator for latex inputs. It seems to be not-so-old and the current method from which wordpress.com uses to render .png images. You can play around with the below URL.

https://s0.wp.com/latex.php?latex=i\hbar\frac{\partial}{\partial+t}\left|\Psi(t)\right>%3DH\left|\Psi(t)\right>\Psi(t hey type stuf in here and get a png)&bg=ffffff&fg=000&s=0

So, there’s a wordpress.org plug-in that utilizes a  similar, if not the exact same generator from wordpress.com. Note the distinction between the .com and .org service. It also has an option to generate from a self hosted server. Humm..

pro: less bandwidth
con: if access to wordpress.com goes down, image rendering capabilities go down with it. This will happen several times a year depending on who’s attacking the DNS.. but if the DNS is down this website will probably be inaccessible as well. Except in Australia. There’s a story to that.

To be reliant on external services.. Sure, to an extent.

wp plugin install wp-latex
wp plugin activate wp-latex

for more details: https://wordpress.org/plugins/wp-latex/faq/

how to vimwiki?

I’ve been reliant on gnote and random .txt files scattered around my drive to write down random things. A friend of mine recommended vimwiki, almost randomly like he had been reading my mind (or had shell access to my laptop).

vim remember.txt
remember to go through the ssh dot files and delete any weird pgp certs you don't recognize
:qw

The vimwiki is more of a plugin than anything, and should be easily installable through pathogen.

You can find the installation instructions here: https://github.com/tpope/vim-pathogen
and for vimwiki: https://vimwiki.github.io/

I shouldn’t need to go through writing the instructions here because the details are literally right there.

What I did need to figure out was that I was expected to make my own index.wiki file inside the ~/vimwiki/ folder. I was surprised when I could “enter” and “backspace” between files joined together by a link. #jawdrop.

:Vimwiki2HTML

creates a folder with a html transaction (along with a .css) of the page you’re on. It doesn’t follow through the nested links though. With maybe about a 100 functions on that help page, it’ll take a while to get acquainted with this program. I think it’s safe to say it has more functionality than what I had been previously using. I’ll play around with this for a few weeks and then decide if I’m better off with it.

What’s next? humm… I have less than 4 days to prep up on my Korean, toy around with some java, and I think they’ll be putting me in something about a “smarter cities” think group. I suspected it was related to the CES hackathon but that’s this weekend. I should probably go to that, but I need some ‘me’ time and me time includes prepping up on my Korean and toying around with some java. Also, my friend tells me I need to get more sunlight. I do.

[edit] Had been invited by some friends to join them at the CES hackathon this weekend, and despite making an attempt to print out my ticket, I just received an e-mail specifying that entrants needed to be registered for the CES portion by 7 days ago. This would be a separate registration process, and they’re only letting the first 450 people in. It’s fine. More ‘me’ time. Also,

convert -density 300 ticket.pdf -fill blue -opaque black ticketout.pdf

will attempt to change all your black pixels into blue ones in case your printer ran out of black ink. Sadly, I also just found out that we have a Kodak that refuses to print if it detects the black is low (or refuses to print black if it detects the color is low). Hardware should not be used like this against the consumer’s interest. Alternatively I could’ve gone to a UPS store or library that opens early to get something printed – mobile ticket barcodes ftw.

On a lighter note, I finally received the schedule for the Ajou workshop on Monday, so it looks like I’m slowly placing things on that to do list.