object Execution {
implicit class Ops[A, C[_]](c: C[A]) {
def flatMap[B](f: A => C[B])(implicit e: Execution[C]): C[B] =
e.doAndThen(c)(f)
def map[B](f: A => B)(implicit e: Execution[C]): C[B] =
e.doAndThen(c)(f andThen e.create)
}
This is a set up for projects which want to check in only their source files, but have their gh-pages branch automatically updated with some compiled output every time they push.
You want a script that does a local compile to e.g. an out/
directory. Let's call this compile.sh
for our purposes, but for your project it might be npm build
or gulp make-docs
or anything similar.
The out/
directory should contain everything you want deployed to gh-pages
. That almost always includes an index.html
.
Vim is one of the two widely known text-based Text Editor cum IDEs, the other one being, ahem, Emacs. For people new to Vim, it might have be a big leap, it is markedely different from the usual text editors, it being modal (implying that the same keys do differnt things in different modes. Don't worry, modes are awesome.)
Some cool things to know about Vim:
- You don't have to press any keys outside beyond the Return key. No need to stretch/move your hands to press the Home/End/PageUp/PageDown/Up/Down/Left/Right keys. There are much better ways to do that in Vim.
- Vim works even on the most basic and old Linux computer you can run into, it runs via SSH, and basically it works everywhere.
My Voyage through the seas of programming | |
------------- | |
I came to IITK as a guy who thought he knew coding. I had scored 99 in my Informatics Practices exam, and knew some C++. This was much more than any of my friends had done. | |
I was *naive*, hadn't even heard of algorithms by then. When I met a programming club secy, I was boasting that I could write loops as complex as I want (whatever this means, I feel stupid about this still). | |
I used to think I can start development any time, by virtue of my knowlegde of computers. I was wrong. In more ways than one. | |
Somehow, I met this guy Pallav here who seemed as enthusiastic about coding as me, albeit with a hundred times more experience than me. We both got together to code. All day long, sitting in the hall computer room. | |
**Algorithms** |