This file contains 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
<div id="target"></div> | |
<script src="https://www.gstatic.com/charts/loader.js"></script> | |
<script> | |
(function() { | |
'use strict'; | |
function drawChart() { | |
var query = new google.visualization.Query('https://docs.google.com/spreadsheets/d/1BzKIB93LvvdmWmxdKAk99V7vWDKBOq6P3HqQeQnwLpI/edit?usp=sharing'); | |
query.send(handleQueryResponse); | |
} | |
function handleQueryResponse(response){ |
This file contains 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 Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
This file contains 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
(require 'elnode) | |
(defun my-elnode-server (docroot port) | |
"Static server" | |
(interactive (list | |
(read-directory-name "Document root: " default-directory) | |
(read-number "Port: " 8001))) | |
(elnode-start (elnode-webserver-handler-maker docroot) :port port)) |
This file contains 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
(defadvice linum-on (around linum-on-around) | |
(unless (string-match "SPEEDBAR" (buffer-name)) | |
ad-do-it)) |
This file contains 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
;;; clarity-theme.el --- Clarity and beauty, imported from color-theme 6.6.0 | |
(deftheme clarity | |
"Clarity and beauty, imported from color-theme 6.6.0") | |
(custom-theme-set-faces 'clarity | |
'(default ((t (:stipple nil :background "black" :foreground "white" :inverse-video nil :box nil :strike-through nil :overline nil :underline nil :slant normal :weight normal :height 98 :width normal :foundry "outline" :family "Courier New")))) | |
'(bold ((t (:weight bold)))) | |
'(italic ((t (:slant italic)))) | |
'(bold-italic ((t (:slant italic :weight bold)))) |
This file contains 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
(load-library "cl-extra") | |
(defun my-get-face-attributes (face) | |
(reverse | |
(mapcan '(lambda (a) | |
(let ((v (face-attribute face a))) | |
(if (not (or (eq a :inherit) (eq v 'unspecified))) | |
(list v a)))) | |
(mapcar 'car face-attribute-name-alist)))) |
This file contains 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
;;; clarity-theme.el --- White on black color theme by Richard Wellum, created 2003-01-16. | |
;; Copyright (C) 2012 condotti | |
;; Author: Akio Kondo <[email protected]> | |
;; Keywords: | |
;; This program is free software; you can redistribute it and/or modify | |
;; it under the terms of the GNU General Public License as published by | |
;; the Free Software Foundation, either version 3 of the License, or |
This file contains 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
(defn combination [k xs] | |
(if (pos? k) | |
(if (<= (count xs) k) (list xs) | |
(concat | |
(map #(conj % (first xs)) (combination (dec k) (rest xs))) | |
(combination k (rest xs)))))) | |
(defn all-partitions [xs] | |
(map #(list % (seq (reduce disj (set xs) %))) | |
(combination (/ (count xs) 2) xs))) |
This file contains 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
(defn brainfuck2 [s] | |
(let [c (transient (vec (repeat 30000 (byte 0))))] | |
(letfn [(fmb [[t p] f ip] ; find matching bracket | |
((fn [ip n] | |
(condp = (nth s ip) | |
t (if (= n 0) ip (recur (f ip) (dec n))) | |
p (recur (f ip) (inc n)) | |
(recur (f ip) n))) | |
ip 0))] | |
((fn [dp ip] |
This file contains 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
(defn brainfuck [s] | |
(letfn [(fmb [[t p] f ip] ; find matching bracket | |
((fn [ip n] | |
(condp = (nth s ip) | |
t (if (= n 0) ip (recur (f ip) (dec n))) | |
p (recur (f ip) (inc n)) | |
(recur (f ip) n))) | |
ip 0))] | |
((fn [c dp ip] | |
(if (< ip (count s)) |
NewerOlder