Skip to content

Instantly share code, notes, and snippets.

View wkf's full-sized avatar
🤝

Will Farrell wkf

🤝
View GitHub Profile
@wkf
wkf / audio.clj
Created October 7, 2016 13:48
Detect beats in Clojure
(ns little-lambda.server.audio
(:require [clojure.java.io :as io])
(:import (be.tarsos.transcoder Transcoder DefaultAttributes)
(be.tarsos.dsp.onsets ComplexOnsetDetector OnsetHandler)
(be.tarsos.dsp.beatroot BeatRootOnsetEventHandler)
(be.tarsos.dsp.io.jvm AudioDispatcherFactory)))
(defn mp3->wav [source target]
(Transcoder/transcode
(io/file source)
const path = require('path');
const merge = require('webpack-merge');
const webpack = require('webpack');
const cssnext = require('postcss-cssnext');
const cssreporter = require('postcss-reporter');
const ExtractTextPlugin = require('extract-text-webpack-plugin');
const StaticSiteGeneratorPlugin = require('static-site-generator-webpack-plugin');
const PATHS = {
const clock = F.stream();
const resize = F.stream();
const mouseMove = F.stream();
const mousePosition = mouseMove.map((e) => ({
x: (e.clientX / window.innerWidth) * 2 - 1,
y: - (e.clientY / window.innerHeight) * 2 + 1
}));
const cameraToPosition = mousePosition.map((m) => ({
"use strict";
var _ = require('lodash');
var Promise = require('bluebird');
var Immutable = require('immutable');
function Component() {
return class extends Immutable.Record.apply(this, arguments) {
start() {
#!/usr/bin/env bash
######################################################################
# java
######################################################################
curl -L -C - -b "oraclelicense=accept-securebackup-cookie" http://download.oracle.com/otn-pub/java/jdk/8u60-b27/jdk-8u60-linux-x64.tar.gz | tar zxvf -
export JAVA_HOME="$(pwd)/jdk1.8.0_60"
export PATH="$JAVA_HOME/bin:$PATH"
;;; packages.el --- spacemacs configuration layer for cider
;; Local Variables:
;; flycheck-disabled-checkers: (emacs-lisp emacs-lisp-checkdoc)
;; End:
(defvar my-cider-packages '(cider clojure-quick-repls))
(defun my-cider-nrepl-server-filter (process output)
"A process filter for the nrepl server buffer that applies ansi colors and tails"
(def menu
[[:body.show-header-menu
[:header
[:nav
{:max-height (px 450)}]
hamburger-to-x]]
[:body.show-footer-menu
[:footer
[:nav
(prodigy-define-service
:name "Bunsen Web"
:command "/Users/will/Dropbox/Projects/Bunsen/web/node_modules/.bin/roots"
:args '("watch" "--no-open")
:cwd "/Users/will/Dropbox/Projects/Bunsen/web"
:tags '(bunsen)
:env '(("PORT" "8081"))
:kill-signal 'sigkill)
(prodigy-define-service
(add-hook 'nrepl-connected-hook
(lambda ()
(require 'ansi-color)
(with-current-buffer nrepl-server-buffer
(linum-mode)
(ansi-color-apply-on-region (point-min) (point-max))
(add-hook 'after-change-functions
(lambda (begin end length)
(ansi-color-apply-on-region begin end))
nil
(custom-set-faces
;; custom-set-faces was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
'(clojure-keyword-face ((t (:inherit font-lock-keyword-face))))
'(company-tooltip-common ((t (:inherit company-tooltip :weight bold :underline nil))))
'(company-tooltip-common-selection ((t (:inherit company-tooltip-selection :weight bold :underline nil))))
'(diff-hl-change ((t (:foreground "#ffcc66"))))
'(diff-hl-delete ((t (:foreground "#f2777a"))))