I hereby claim:
- I am blendmaster on github.
- I am blendmaster (https://keybase.io/blendmaster) on keybase.
- I have a public key whose fingerprint is 7A45 BF92 A2EF 3975 F965 CB84 D4D3 5CF7 AD8B B97A
To claim this, I am signing this object:
| import java.io.*; | |
| import java.nio.file.*; | |
| import java.util.*; | |
| import java.util.function.BiFunction; | |
| import java.util.function.Function; | |
| import java.util.function.Supplier; | |
| import java.util.stream.Collectors; | |
| import java.util.stream.Stream; | |
| /** |
| import java.util.concurrent.atomic.AtomicReference; | |
| import java.util.function.*; | |
| /** | |
| * Fancy Lenses Like The Ones In Haskell | |
| */ | |
| class FancyLenses { | |
| // You've got yourself some fine immutable JavaBeans™, and you're cool with that. |
I hereby claim:
To claim this, I am signing this object:
| import org.gradle.api.Plugin | |
| import org.gradle.api.Project | |
| import org.gradle.api.artifacts.Configuration | |
| import org.gradle.api.file.FileTreeElement | |
| import org.gradle.api.internal.file.FileResolver | |
| import org.gradle.api.internal.tasks.DefaultScalaSourceSet | |
| import org.gradle.api.plugins.JavaBasePlugin | |
| import org.gradle.api.plugins.JavaPluginConvention | |
| import org.gradle.api.reporting.ReportingExtension | |
| import org.gradle.api.tasks.ScalaRuntime |
| // ==UserScript== | |
| // @id www.reddit.com-0496007c-95e3-4661-b485-846f1932fbbb@scriptish | |
| // @name gif hover preview | |
| // @version 0.1 | |
| // @namespace | |
| // @author blendmaster | |
| // @description shows gifs on hover | |
| // @match http://www.reddit.com/r/gifs/* | |
| // ==/UserScript== |
| // @namespace http://qoln.org/ | |
| // @include http://*facebook.com* | |
| // @creator Miles Meloro [[email protected]], rewritten by anon | |
| // @version 0.11 | |
| // @date 2012-04-29 | |
| // ==/UserScript== | |
| var inputButton = document.createElement('button'); | |
| inputButton.textContent = 'Love It'; | |
| inputButton.addEventListener( 'click', function () { |
| lines = -> Array::join.call arguments, '\n' # joins arguments into a newline separated string | |
| # helper function, generates instructions to put base+index into D | |
| load_from_base = (base) -> (idx) -> lines "@#{base}", "D=M", "@#{idx}", "A=D+A", "D=M" | |
| push_segment = # returns instructions to load value to push into D given index | |
| constant: (idx) -> lines "@#{idx}" 'D=A' | |
| argument: load_from_base 'ARG' | |
| local: load_from_base 'LCL' | |
| this: load_from_base 'THIS' |
| code = input | |
| .replace /\/\/.*/gm '' # remove comments | |
| .trim! | |
| .split /\s+/ # turn into lines | |
| .filter (it, i) -> # build symbol table and remove labels | |
| if it.match /\(([A-Za-z\._$:][\w\.$:]*)\)$/ # that[1] is the first capturing group | |
| symbols[that[1]] = i - len++ # len++ adjusts the symbol's line number to the filtered array | |
| return false | |
| true # keep actual instructions | |
| .map -> # parse instructions |
| /** | |
| * Floating images left of headings | |
| */ | |
| body {margin: 50px ; } | |
| div, p, h1, img { outline: 1px dotted; } | |
| div { | |
| overflow: hidden; | |
| margin: 10px 0; | |
| } |