sed -i '' '/null/d' filename.txt — removes all strings containing null from a file filename.txt
wc -l filename.txt — prints the number of lines in the file
| // Note: promise will be rejected if user won't allow browser | |
| // to detect location | |
| function getLocation () { | |
| return new Promise((resolve, reject) => { | |
| if (navigator.geolocation) { | |
| navigator.geolocation.getCurrentPosition(resolve, reject) | |
| } else { | |
| reject() | |
| } | |
| }) |
| def fib(n: Int) = { | |
| def fib_tail(n: Int, a: Int, b: Int): Int = n match { | |
| case 0 => a | |
| case _ => fib_tail(n - 1, a + b, a) | |
| } | |
| fib_tail(n, 0, 1) | |
| } |
| DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE | |
| Version 2, December 2004 | |
| Copyright (C) 2011 Olivier Scherrer | |
| Everyone is permitted to copy and distribute verbatim or modified | |
| copies of this license document, and changing it is allowed as long | |
| as the name is changed. | |
| DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE |
| var objectIdRegEx = /^([^\/]+)\/(.*?)\/([^\/]+)\/([0-9a-f]{24})$/; |