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
/* | |
rk 2017-09-14 | |
exported from https://github.com/tsayen/dom-to-image/releases/tag/2.6.0 | |
*/ | |
/*global HTMLCanvasElement,Element,HTMLTextAreaElement,HTMLInputElement,SVGElement,SVGRectElement,XMLSerializer,Image,XMLHttpRequest,FileReader,CSSRule,HTMLImageElement*/ |
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
onMouseWheel(evt) { | |
var scrollTarget = evt.targetMorphs.find(ea => ea.isClip()); | |
if (this !== scrollTarget) return; | |
var {deltaY, deltaX} = evt.domEvt, | |
magnX = Math.abs(deltaX), | |
magnY = Math.abs(deltaY); | |
// This dance here is to avoid "overscroll", i.e. you scroll a clip morph | |
// and it reaches it's boundary. Normally the clip morphs up the scene graph |
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
// ==UserScript== | |
// @name spiegel no ad-blocker | |
// @namespace http://tampermonkey.net/ | |
// @version 0.1 | |
// @description removes no-ad-blocker popups and makes spiegel plus readable | |
// @author You | |
// @match http://www.spiegel.de/* | |
// @grant none | |
// ==/UserScript== |
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 require, __dirname*/ | |
let fs = require("fs"), | |
path = require("path"), | |
files = [ | |
require.resolve("babel-standalone/babel.js"), | |
require.resolve("systemjs/dist/system.src.js"), | |
require.resolve("lively.modules/dist/lively.modules.js"), | |
require.resolve("lively-system-interface/dist/lively-system-interface-only-local.js"), |
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 require, __dirname*/ | |
let fs = require("fs"), | |
path = require("path"), | |
x = require("child_process").execSync; | |
if (!fs.existsSync("babel-node.js")) { | |
console.log("Donwloading babel-standalone"); | |
x("curl -k https://wzrd.in/standalone/babel-standalone > babel-node.js", {stdio: "inherit"}); | |
} |
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
(defun rk/tide-start-server-process (node-executable tsserverjs) | |
"" | |
(let* ((tramp-p (tramp-tramp-file-p tsserverjs)) | |
(tsserverjs (if tramp-p | |
(tramp-file-name-unquote-localname | |
(tramp-dissect-file-name tsserverjs)) | |
tsserverjs)) | |
(process (if tramp-p | |
(start-file-process "tsserver" buf | |
"bash" "--login" "-c" |
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
;; -*- no-byte-compile: t; -*- | |
;; | |
;; -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- | |
" | |
setup | |
export GOPATH=$HOME/goprojects | |
go get -u github.com/nsf/gocode | |
go get golang.org/x/tools/cmd/guru |
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-package god-mode | |
:after which-key multiple-cursors | |
:ensure | |
:config | |
(define-key god-local-mode-map (kbd ".") 'repeat) | |
(global-set-key (kbd "<escape>") 'god-mode-all) | |
(define-key mc/keymap (kbd "<escape>") 'god-mode-all) | |
(which-key-enable-god-mode-support) |
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
;; clj -R:figwheel -Sdeps '{:deps {org.clojure/tools.trace {:mvn/version "0.7.10"}}}' -i trace_cljs_repl_start.clj -m figwheel.main -b dev -r | |
(ns user) | |
(require '[clojure.tools.trace :as t]) | |
(require 'cljs.main) | |
(require 'cljs.repl) | |
(require 'figwheel.main) | |
(require 'figwheel.repl) | |
(require 'figwheel.core) |
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
(def dragged (atom nil)) | |
(cljs.core/add-watch dragged :drag-watcher (fn [key ref old-state new-state] (println "dragged changed"))) | |
(defn on-drag [evt] | |
(println "on-drag")) | |
(defn on-drag-start [evt] | |
(println "on-drag-start") | |
(reset! dragged (.-target evt)) | |
(set! (.. evt -target -style -opacity) .5)) |