Orgmode for nikola post

first need to setup the orgmode plugin for nikola refer to here, then put this into init.el ;;; set up new nikola new post directly in emacs ;; does not work on windows (defun publish-blog-post () "nikola github-deploy" (interactive) (save-buffer) (let ((my-blog-repo "path to your blog repo"))) ;; (let (my-blog-repo)) ;; (setq my-blog-repo "~/shelper.github.io") (cd my-blog-repo) (shell-command "nikola github_deploy")) (defun new-blog-post (title) "new blog post to shelper.github.io" (interactive "sEnter post title: ") (let ((my-blog-repo "path to your blog repo"))) (cd my-blog-repo) (setq new-post-cmd (concat "nikola new_post -f orgmode -t " "\"" title "\"")) (shell-command new-post-cmd) (setq new-post-file (concat my-blog-repo "/posts/" (replace-regexp-in-string " " "-" title) "....

May 29, 2018 · 1 min · Shelper

Jupyter skills and tricks

use jupyterlab use interact for interactive widget use qgrid for better dataframe display within ipython notebook, follow instructions here %load_ext sql for sql query within the notebook, refer to here

May 28, 2018 · 1 min · Shelper

switch recent two buffer alternatively

so there is a post described using key chord for fast buffer switching between most recent two buffers. it works for most cases, but if you are using org babel mode and editing source code in the *org src .* buffer, then this *org src .* buffer cannot be accessed by the method described here. so I made another function to solve this issue, and here it is: (defun get-next-buffer () (interactive) (if (string= (car (helm-buffer-list)) " *Minibuf-1*") (switch-to-buffer (car (cdr (helm-buffer-list)))) (switch-to-buffer (car (helm-buffer-list))))) (key-chord-define-global "jk" 'get-next-buffer) strangely when switching buffer using `helm-buffer-lists`, and if you exit without selecting any buffer, you gets `*Minibuf-1*` into the buffer list and will switch to minibuffer....

May 23, 2018 · 2 min · Shelper

using travis CI for github repo

using Nikola with Travis CI on github.io pages major reference here it is noticeable that instead of running travis login travis enable travis encrypt-file id_rsa --add we should run travis login travis encrypt-file id_rsa --add travis enable

October 5, 2017 · 1 min · Shelper

set up nikola for markdown

to use nikola you need to install it with some other packages as well pip instal nikola markdown ws4py watchdog then to enable markdown, you need to change the conf.py variable POSTS and PAGES POSTS = ( ("posts/*.md", "posts", "post.tmpl"), ("posts/*.rst", "posts", "post.tmpl"), ("posts/*.txt", "posts", "post.tmpl"), ("posts/*.html", "posts", "post.tmpl"), ) PAGES = ( ("pages/*.md", "pages", "story.tmpl"), ("pages/*.rst", "pages", "story.tmpl"), ("pages/*.txt", "pages", "story.tmpl"), ("pages/*.html", "pages", "story.tmpl"), ) you may also need to change the github settings for easy github deploy...

February 9, 2017 · 1 min · Shelper