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
#!/bin/bash | |
for filename in ./*.flac; do | |
ffmpeg -i "$filename" -vn -c:a libopus -b:a 128k -vbr on -compression_level 10 -frame_duration 60 -application audio "${filename%.*}.ogg"; | |
done |
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
#!/bin/bash | |
for filename in ./*.flac; do | |
ffmpeg -i "$filename" -codec:a libmp3lame -q:a 0 -b:a 320k -compression_level 9 -id3v2_version 3 -write_id3v1 1 "${filename%.*}.mp3"; | |
done |
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
{:state-code :CA | |
:primary-type :closed-primary | |
:state-name "California" | |
:primary-registration-deadline "Mon, Feb 17" | |
:primary-date "Tue, March 3" | |
:primary-comment "Californians must register as democrat or undeclared to vote | |
for Yang!"} |
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
(defonce app-state (reagent/atom {:foo 0 :bar 0})) | |
(defn show-count [r] | |
[:div "Count is" (str @r)]) | |
(defn counted [ratom] | |
(let [render-count (reagent/atom 0)] | |
(fn [ratom] | |
(let [{:keys [foo bar]} @ratom] | |
(swap! render-count inc) |
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
(defvar current-date-time-format "%a %b %d %H:%M:%S %Z %Y" | |
"Format of date to insert with `insert-current-date-time' func | |
See help of `format-time-string' for possible replacements") | |
(defvar current-time-format "%a %H:%M:%S" | |
"Format of date to insert with `insert-current-time' func. | |
Note the weekly scope of the command's precision.") | |
(defun insert-current-date-time () | |
"insert the current date and time into current buffer. |
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
(global-company-mode) | |
(define-key company-active-map [tab] 'company-select-next) | |
(define-key company-active-map (kbd "<backtab>") 'company-select-previous) |
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
(defmacro if-macro [pred truth-body false-body] | |
(cond | |
pred truth-body | |
:else false-body)) | |
(defn if-fn [pred truth-body false-body] | |
(cond | |
pred truth-body | |
:else false-body)) |
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
;; Library that I wish existed for HTML templating | |
(def base-html | |
[:html | |
[:head] | |
[:body | |
[:div {:id "id-name"}]]]) | |
(def index-page | |
"Wishful Thinking." |
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
(add-hook 'evil-mode-hook | |
(lambda () | |
(local-set-key (kbd "M-j") 'evil-next-line) | |
(local-set-key (kbd "M-k") 'evil-previous-line))) |
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
Install SBCL. In ubuntu this would be $ sudo apt-get install sbcl | |
Install emacs. In ubuntu this would be $ sudo apt-get install emacs | |
Put the following as your ~/.emacs file: | |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | |
;;; Dependencies ;; | |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | |
(require 'cl) ; Enable Common Lisp functions(Does not actually use CL) | |
(defalias 'get-alist 'assoc-default) ; get-alist is gone |
NewerOlder