Skip to content

Instantly share code, notes, and snippets.

(defun-g frag-stage ((uv :vec3)
(normal :vec3))
(let* ((object-color (v! 0 1 0))
;; Ambient light
(ambient-strength 0.01)
(ambient-light-color (v! 1 1 1))
(ambient (* ambient-light-color
ambient-strength))
;; Diffuse light
(instr :halt 0 ()
(setf (halt cpu) t))
VIENE ESPANSO IN
(PROGN
(DEFMETHOD EXEC! ((OPCODE (EQL 0)) (CPU CPU))
(INCPC! CPU)
(LET ()
;; As a memento, here the code I wrote for the first part
;; Not malleable enough for the second part.
(defun funky-eval (tokens)
(let ((stack nil))
(loop while (not (null tokens))
do (let ((token (pop tokens)))
(if (scan "\\)" token)
(return-from funky-eval (values (pop stack)
tokens)))
(if (scan "\\(" token)
library(ggplot2)
library(gridExtra)
library(dplyr)
library(readr)
library(scales)
library(lubridate)
raw <- readr::read_csv("~/Downloads/Activities.csv")
GOAL = 3500
(defun increase-text-scale-in-buffer-group (major-mode-name)
"Increment text scale for all buffers matching a give major mode name"
(interactive
(list (intern (completing-read
"Select major mode from the list: "
(remove-duplicates (mapcar (lambda (b)
(buffer-local-value
'major-mode (get-buffer b)))
(buffer-list)))))))
(cl-loop for buffer in (buffer-list)
cabal: At least the following dependencies are missing:
parsec-numbers -any
ghc-mod: GMEProcess "readProcessStderrChan" "cabal" ["configure","--with-ghc=ghc","--flags",""] (Left 1)
(defun my-helm-grab-candidates ()
(interactive)
(with-current-buffer "*helm find files*"
(clipboard-kill-ring-save (point-min) (point-max))))
(define-key helm-map (kbd "C-c C-c") 'my-helm-grab-candidates)
type CheckState = Open | Botched | Solved
data Check = Check {
description :: String ,
target :: Integer ,
status :: CheckState
}
compareList :: (Show a, Ord a) => (a -> a -> Bool) -> [a] -> Bool
compareList f list
| trace (show list) False = undefined
compareList f [] = True
compareList f [x,y] = f x y
compareList f lst@(x:y:xs) = f x y && compareList f (drop 1 lst)
@larsen
larsen / org2webjump.el
Created June 28, 2016 15:34
Automatic webjump list from org
(defun get-webjump-sites ()
(with-current-buffer (get-file-buffer "~/Dropbox/stefanorodighiero.net/links.org")
(delq nil
(mapcar
(lambda (i)
(let ((item-string (cdr (assoc "ITEM" i)))
(regex "\\[\\[\\(.*\\)\\]\\[\\(.*\\)\\]\\]"))
(if (posix-string-match regex item-string)
`(,(match-string 2 item-string) . ,(match-string 1 item-string)))))
(org-map-entries 'org-entry-properties nil 'file)))))