Skip to content

Instantly share code, notes, and snippets.

View narendraj9's full-sized avatar

Narendra Joshi narendraj9

View GitHub Profile
(defun next-line (&optional arg try-vscroll)
"Move cursor vertically down ARG lines.
Interactively, vscroll tall lines if `auto-window-vscroll' is enabled.
Non-interactively, use TRY-VSCROLL to control whether to vscroll tall
lines: if either `auto-window-vscroll' or TRY-VSCROLL is nil, this
function will not vscroll.
ARG defaults to 1.
If there is no character in the target line exactly under the current column,
(defun org-late-todo (n)
"Switch todo assuming an old date [n days ago]"
(interactive "nDays: ")
(let* ((delta-time (days-to-time n))
(now (time-subtract (current-time)
delta-time)))
(letf ((symbol-function 'current-time) (lambda ()
now))
(org-agenda-todo))))

The Activity and Art of Reading

What happens as you age as a reader? In any activity, experience shifts one’s focus from low level details to higher abstractions. Similarly, a better reader is able to see the structure of the books and no mere lines in the book. He is able to see the sequence in which arguments are presented. Organization becomes one of the observables as one becomes more experienced as a reader.

There is a difference between being taught and learning. While something is being explained to you and is completely intelligible, you are being taught

#include <stdio.h>
int xgcd(int a, int b) {
int r = b, old_r = a;
int t = 1, old_t = 0;
int s = 0, old_s = 1;
int quotient;
int temp;
@narendraj9
narendraj9 / springer-free-maths-books.md
Created December 29, 2015 15:53 — forked from bishboria/springer-free-maths-books.md
Springer have made a bunch of books available for free, here are the direct links

The introduction to Reactive Programming you've been missing

(by @andrestaltz)

So you're curious in learning this new thing called (Functional) Reactive Programming (FRP).

Learning it is hard, even harder by the lack of good material. When I started, I tried looking for tutorials. I found only a handful of practical guides, but they just scratched the surface and never tackled the challenge of building the whole architecture around it. Library documentations often don't help when you're trying to understand some function. I mean, honestly, look at this:

Rx.Observable.prototype.flatMapLatest(selector, [thisArg])

Projects each element of an observable sequence into a new sequence of observable sequences by incorporating the element's index and then transforms an observable sequence of observable sequences into an observable sequence producing values only from the most recent observable sequence.