The following package.json
snippet is how to reference a local module in your Node.js project:
package.json
{
...
"dependencies": {
"local-module": "file:./local-module",
...
}
The following package.json
snippet is how to reference a local module in your Node.js project:
package.json
{
...
"dependencies": {
"local-module": "file:./local-module",
...
}
The following snippet is how to alias a task name in Gradle:
build.gradle
// You can now run "gradle alias" and it would be equivalent to running "gradle taskToAlias"
task alias {
dependsOn allprojects.collect { proj ->
proj.tasks.matching {
it.name == 'taskToAlias'
}
Here are the steps needed to run a self hosted Open Street Map server (using Docker):
Download desired pbf
files (like south-carolina-latest.osm.pbf
) from https://download.geofabrik.de or just use the following empty planet below:
<?xml version='1.0' encoding='UTF-8'?>
<osm version="0.6" generator="osmconvert 0.8.8" timestamp="2019-10-23T20:18:02Z">
<bounds minlat="42.4276" minlon="1.412368" maxlat="42.65717" maxlon="1.787481"/>
</osm>
Here are the steps needed to convert an image (like JPG or TIF) to MBTiles using GDAL:
Download and install GDAL (https://gdal.org/, https://anaconda.org/conda-forge/gdal):
conda install -c conda-forge gdal
Installing GDAL is kind of a pain in the ass, especially on Windows. I'm assuming you'll be able to work out whatever issues you run into here.
Download example jpg
and tif
map images we can work with:
jpg
files.firewall-cmd --permanent --add-service=http
.firewall-cmd --reload
.{ | |
"1": "2021-06-20", | |
"2": "2021-06-21", | |
"3": "2021-06-22", | |
"4": "2021-06-23", | |
"5": "2021-06-24", | |
"6": "2021-06-25", | |
"7": "2021-06-26", | |
"8": "2021-06-27", | |
"9": "2021-06-28", |
import requests | |
import json | |
import time | |
if __name__ == '__main__': | |
db = {} | |
while True: | |
r = requests.get('https://opentdb.com/api.php?amount=50') | |
results = r.json()['results'] | |
for result in results: |
# How to fix: "chromedriver" can’t be opened because Apple cannot check it for malicious software. | |
xattr -d com.apple.quarantine /opt/homebrew/bin/chromedriver |
# Increase display brightness command | |
osascript -e 'tell application "System Events"' -e 'key code 144' -e ' end tell' | |
# Decrease display brightness command | |
osascript -e 'tell application "System Events"' -e 'key code 145' -e ' end tell' | |
# zsh solution to turn it all the way up on one command, just run `b` on the cmd line | |
alias bright="osascript -e 'tell application \"System Events\"' -e 'key code 144' -e ' end tell'" | |
alias b="repeat 10 { bright }" |