This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{-# LANGUAGE DeriveFunctor #-} | |
{-# LANGUAGE FlexibleContexts #-} | |
import Control.Monad.State | |
import Control.Monad.Trans.Free | |
data Turtle n | |
= MoveForward n | |
| MoveBackwards n | |
| TurnLeft n | |
| TurnRight n |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for (int i = 0; i < total; i++) { | |
foo(bar); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/home/sbrg/sbrg/teaching/ | |
├── classes | |
│ └── programming_languages | |
│ └── index.md | |
└── index.md | |
2 directories, 2 files |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
* Prolog | |
** Week 36 | |
*** Exercise 1 | |
*** Exercise 2 | |
should become(if I run the function with point on ** Week 36) | |
* Exercise 1 | |
* Exercise 2 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defun sbrg:export-subtree-to-markdown (args) | |
(interactive "P") | |
(save-excursion | |
(let ((cur-heading (org-get-heading t t))) | |
(setq filename (downcase (replace-regexp-in-string " " "" cur-heading))) | |
(setq full-path (format "~/sbrg/teaching/classes/%s/exercises/%s.md" (car (org-property-values "CLASS_SUBDIR")) filename)) | |
(org-md-export-as-markdown nil t) | |
(switch-to-buffer "*Org MD Export*") | |
(insert "---\n") | |
(insert (format "title: %s\n" cur-heading)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; Use Ctrl+hjkl to switch between windows | |
(define-key evil-normal-state-map (kbd "C-w l") 'evil-window-right) | |
(define-key evil-normal-state-map (kbd "C-w h") 'evil-window-left) | |
(define-key evil-normal-state-map (kbd "C-w j") 'evil-window-down) | |
(define-key evil-normal-state-map (kbd "C-w k") 'evil-window-up) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; { | |
;; "installed": { | |
;; "redirect_uris": [ | |
;; "urn:ietf:wg:oauth:2.0:oob", | |
;; "http:\/\/localhost" | |
;; ], | |
;; "client_secret": "C1lXkVpjZiRP3Y_9GqZS1sJf", | |
;; "auth_provider_x509_cert_url": "https:\/\/www.googleapis.com\/oauth2\/v1\/certs", | |
;; "token_uri": "https:\/\/accounts.google.com\/o\/oauth2\/token", | |
;; "auth_uri": "https:\/\/accounts.google.com\/o\/oauth2\/auth", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(format-time-string "%F %a %H:%M" '(33 33 20 23 9 2015 nil nil nil)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; ss mm hh dd m yyyy dow dst zon | |
(format-time-string "%F %a %H:%M" '(33 33 20 23 9 2015 nil nil nil)) | |
;; result: "1970-01-26 Mon 01:45" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Text.Parsec | |
import Text.Parsec.String | |
import Data.Map.Strict (Map) | |
import qualified Data.Map.Strict as M | |
data Attribute | |
= ItemLevel | |
| DropLevel | |
| Quality | |
| Sockets |