This file contains hidden or 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
const params = U.view(['search', searchParamsL], location) | |
const search = U.atom(params.get().search || '') | |
const debouncedSearch = U.debounce(300, search) | |
debouncedSearch | |
.onValue(q => params.modify( | |
q ? R.assoc('search', q) : R.dissoc('search') | |
)) | |
const items = U.thru( | |
debouncedSearch, |
This file contains hidden or 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
split :: Char -> String -> (String, String) | |
split c str = (start, rest) | |
where start = takeWhile (/= c) str | |
rest = dropWhile (== c) $ dropWhile (/= c) str | |
myWords :: String -> [String] | |
myWords [] = [] | |
myWords str = start : (myWords rest) | |
where (start, rest) = split ' ' str |
This file contains hidden or 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 bash | |
# Requirements: | |
# - Add https://github.com/lapfelix/BluetoothConnector/ to $PATH | |
mac=`BluetoothDeviceConnector | grep 'Beats Studio³' | awk '{print $1}'` | |
BluetoothDeviceConnector $mac |
This file contains hidden or 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
// Setup basic express server | |
var express = require('express'); | |
var app = express(); | |
// Spool up server | |
var server = app.listen(app.get('port'), function() { | |
console.log('App listening on port %d', app.get('port')); | |
}); | |
// Import socket_api |
This file has been truncated, but you can view the full file.
This file contains hidden or 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
[ | |
{"name":"Keeley Bosco","email":"[email protected]","city":"Lake Gladysberg","mac":"08:fd:0b:cd:77:f7","timestamp":"2015-04-25 13:57:36 +0700","creditcard":"1228-1221-1221-1431"}, | |
{"name":"Rubye Jerde","email":"[email protected]","city":null,"mac":"90:4d:fa:42:63:a2","timestamp":"2015-04-25 09:02:04 +0700","creditcard":"1228-1221-1221-1431"}, | |
{"name":"Miss Darian Breitenberg","email":null,"city":null,"mac":"f9:0e:d3:40:cb:e9","timestamp":"2015-04-25 13:16:03 +0700","creditcard":null}, | |
{"name":"Celine Ankunding","email":"[email protected]","city":null,"mac":"3a:af:c9:0b:5c:08","timestamp":"2015-04-25 14:22:22 +0700","creditcard":"1228-1221-1221-1431"}, | |
{"name":"Dr. Araceli Lang","email":"[email protected]","city":"Yvettemouth","mac":"9e:ea:28:41:2a:50","timestamp":"2015-04-25 21:02:11 +0700","creditcard":"1211-1221-1234-2201"}, | |
{"name":"Esteban Von","email":null,"city":null,"mac":"2d:e4:f0:dd:90:96","timestamp":"2015-04-25 21:47:09 +0700","creditcard":null}, | |
{"name":"Everette Swift","em |
This file contains hidden or 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
npm install -g watchy | |
watchy -w file.txt -- scp file.txt user@host:path/to/dest |
This file contains hidden or 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 bash | |
# rust-servers | |
# | |
# Simple rust server finder for command-line. | |
# Useful for getting the map of your server. | |
# | |
# Requirements: | |
# - brew install fzf | |
# - npm install -g ramda-cli |
This file contains hidden or 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 bash | |
aws s3api list-objects --bucket stuff --prefix photo/ --delimiter '/' |\ | |
ramda '.CommonPrefixes' 'pluck \Prefix' 'map split "/"' 'map nth 1' -R |\ | |
xargs -P4 -I % aws s3api list-objects --bucket stuff --prefix photo/% \ | |
--query '{%: [sum(Contents[].Size), length(Contents[])]}' |\ | |
ramda --slurp -R \ | |
merge-all to-pairs \ | |
'map -> zip-with ((k,v) -> "#k.#{it.0}:#v|g"), <[ s3_total_size s3_count ]>, it.1' \ | |
flatten \ |
This file contains hidden or 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
const app = require('app'); |
This file contains hidden or 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
[ | |
{ | |
"name": "Afghanistan", | |
"code": "AF" | |
}, | |
{ | |
"name": "Åland Islands", | |
"code": "AX" | |
}, | |
{ |