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
let pois = document.querySelectorAll(".poi") | |
for (poi of pois) { | |
try { | |
let link = poi.querySelectorAll(".map-links")[0] | |
.querySelectorAll(".link_map")[1].parentElement.getAttribute("href"); | |
let coordinatesText = new URL(link).searchParams.get('q'); | |
let coordinatesList = coordinatesText.split(",") | |
let coordinates = `${coordinatesList[1]},${coordinatesList[0]}`; | |
let info = poi.querySelectorAll(".poi-line")[0].querySelectorAll(".name"); |
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
import scala.io.StdIn | |
import scala.util.Random | |
object Main { | |
def main(args: Array[String]): Unit = { | |
val product: List[(String, String, String)] = for { | |
verb <- verbs.toList | |
person <- persons | |
time <- times | |
} yield (verb, person, time) |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<!-- | |
Recommended way to edit .jfc files is to use Java Mission Control, | |
see Window -> Flight Recorder Template Manager. | |
--> | |
<configuration version="1.0" name="Profiling" description="Low overhead configuration for profiling, typically around 2 % overhead." provider="Oracle"> | |
<producer uri="http://www.oracle.com/hotspot/jvm/" label="Oracle JDK"> |
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 | |
if [ -z "$1" ] || [ -z "$2" ] || [ -z "$3" ]; then | |
echo "usage: kinesis-tail <profile> <stream-name> <iterator-type> [region]" | |
exit 1 | |
fi | |
if [ -n "$4" ]; then | |
export AWS_DEFAULT_REGION=$4 | |
fi |
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
spark | |
.readStream | |
.format("socket") | |
.option("host", "127.0.0.1") | |
.option("port", 9999) | |
.load() | |
.as[String] | |
.map { value => | |
val split = value.split(",") | |
(split(0), split(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
# This script allows you to build any CircleCI project without pushing | |
# the whole project to Github with a new config.yml. This is ideal for | |
# trying out different builds without polluting commit history. | |
# | |
# everything is self explanatory, just generate the API token from CircleCI user menu. | |
curl -XPOST --user ${API_TOKEN}:\ | |
--form revision=${GITHUB_COMMIT}\ | |
--form config=@${CONFIG_YML}\ | |
"https://circleci.com/api/v1.1/project/github/${ORG}/${REPO}/tree/${BRANCH}" |
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
# when restoring WhatsApp in a new phone, all the timestamps of media files will be reset to today. | |
# this script will restore the original modification time of the files | |
cd WhatsApp/Media | |
while read path; do | |
f=$(basename "$path"); | |
touch -m -d "${f:4:4}-${f:8:2}-${f:10:2}T12:00:00z" "${path}"; | |
done < <(find . -regextype posix-extended -regex ".*/[[:alpha:]]{3}-[[:digit:]]{8}-.*") |
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
object Main | |
def main(args: Array[String]) = { | |
println("this is scala") | |
} |