- Basic syntax
- Flow Examples
- Advanced features
- Using with existing libraries (
flow-typed
andlibdefs
) - Tooling
- Try
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
function lens(get, set) { | |
var f = function (a) { return get(a); }; | |
f.set = set; | |
f.mod = function (f, a) { return set(a, f(get(a))); }; | |
return f; | |
} | |
var first = lens( | |
function (a) { return a[0]; }, | |
function (a, b) { return [b].concat(a.slice(1)); } |
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
Sample project for the "Getting started with JavaFX in Clojure" ( https://coderwall.com/p/4yjy1a ) ProTip. |
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
# Quick and dirty demonstration of CVE-2014-0160 by Jared Stafford (jspenguin@jspenguin.org) | |
# The author disclaims copyright to this source code. | |
import sys | |
import struct | |
import socket | |
import time | |
import select | |
import re | |
import codecs |
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/sh | |
mkdir ${TMPDIR}/com.apple.IconServices |
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
select repository_name, count(repository_name) as pushes, repository_description, repository_url | |
from [githubarchive:github.timeline] | |
where type="PushEvent" | |
and repository_language="Emacs Lisp" | |
and parse_utc_usec(created_at) >= parse_utc_usec('2014-01-01 00:00:00') | |
group by repository_name, repository_description, repository_url | |
order by pushes desc | |
limit 100 |
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
(defn get-clipboard [] | |
(.getSystemClipboard (java.awt.Toolkit/getDefaultToolkit))) | |
(defn slurp-clipboard [] | |
(try | |
(.getTransferData (.getContents (get-clipboard) nil) (java.awt.datatransfer.DataFlavor/stringFlavor)) | |
(catch java.lang.NullPointerException e nil))) | |
(defn spit-clipboard [text] | |
(.setContents (get-clipboard) (java.awt.datatransfer.StringSelection. text) nil)) |
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
for i in $HOME/local/*; do | |
[ -d $i/bin ] && PATH="${i}/bin:${PATH}" | |
[ -d $i/sbin ] && PATH="${i}/sbin:${PATH}" | |
[ -d $i/include ] && CPATH="${i}/include:${CPATH}" | |
[ -d $i/lib ] && LD_LIBRARY_PATH="${i}/lib:${LD_LIBRARY_PATH}" | |
[ -d $i/lib ] && LD_RUN_PATH="${i}/lib:${LD_RUN_PATH}" | |
# uncomment the following if you use macintosh | |
# [ -d $i/lib ] && DYLD_LIBRARY_PATH="${i}/lib:${DYLD_LIBRARY_PATH}" | |
[ -d $i/lib/pkgconfig ] && PKG_CONFIG_PATH="${i}/lib/pkgconfig:${PKG_CONFIG_PATH}" | |
[ -d $i/share/man ] && MANPATH="${i}/share/man:${MANPATH}" |
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
#!/usr/bin/env -S deno run --allow-net --allow-read --allow-run | |
let tfVars: string; | |
try { | |
tfVars = Deno.readTextFileSync("./environments/STM.tfvars"); | |
} catch (error) { | |
console.error(error); | |
Deno.exit(1); | |
} |
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
tell application "Google Chrome" | |
tell front window | |
activate | |
if URL of active tab is not equal to "chrome://newtab/" then | |
make new tab at end of tabs | |
end if | |
end tell | |
end tell |