Use eat
to simplify calling curried functions.
You can rewrite a(b)(c)
as eat(a, b, c)
.
eat = (curries...)->
open System | |
open System.Windows.Forms | |
let makeButton label click = | |
let button = new Button() | |
button.Text <- label | |
let clickHandler = new EventHandler(click) | |
button.Click.AddHandler clickHandler | |
button |
var split_p_and_br = s => s.trim().split(/\n\n/).map(s => s.replace(/\n/g, '<br />')) | |
var split_p = s => s.trim().split(/\n\n/).map(s => s.replace(/\n/g, ' ')) | |
var join_p = p => p.join('</p><p>') | |
var fin = t => `<p>${t}</p>` | |
var a = ` | |
hello |
/* Example of something that is inspired by Redux, but totally not a replacement for it. | |
This is NOT intended to be used in anything serious; go find a proper library instead. | |
[MIT licensed](https://opensource.org/licenses/MIT) | |
So do whatever you want with any or all of this but don't blame me for anything. | |
Copyright 2019 Matt McKellar-Spence | |
*/ | |
const {append, cond, inc, join, lensIndex, lensPath, map, over, pathEq, pipe, prop, T, toPairs, toString} = require('ramda') |
def _add_global(name, value): | |
globals()[name] = value | |
def _replace_underscore(text): | |
return text.replace('_', '-') | |
class h: | |
def __init__(self, *children, **attributes): | |
self.attributes = attributes | |
self.children = children |
# Need to import at this level. | |
# Cannot `from logging.Logger.manager import loggerDict`. | |
import logging | |
print(sorted(logging.Logger.manager.loggerDict.keys())) | |
# https://mail.python.org/pipermail/python-list/2012-June/625343.html | |
# by Michael Hrivnak |
access_token=$(curl | |
-H "Metadata-Flavor: Google" | |
--show-error | |
--silent | |
http://metadata.google.internal/computeMetadata/v1/instance/service-accounts/default/token?alt=text | |
| awk '$1 == "access_token" { print $2 }') |
#!/bin/sh | |
docker images | awk '$2 == "<none>" {print $3}' | xargs docker rmi |