Skip to content

Instantly share code, notes, and snippets.

View ondrejzacha's full-sized avatar

Ondrej Zacha ondrejzacha

  • Amsterdam
View GitHub Profile
@halhen
halhen / elevation.R
Last active November 4, 2020 16:11
# Download elevation tif from eg http://www.eea.europa.eu/data-and-maps/data/digital-elevation-model-of-europe
# First, convert elevation tif to a space delimited xyz (lng lat elevation) file
# $ gdal_translate -of XYZ elevation3x3.tif /tmp/file.xyz
df <- read_delim('/tmp/file.xyz', delim=' ', col_names=FALSE)
df %>%
mutate(X3 = na_if(X3, 0)) %>%
ggplot(aes(X1, -X2 + 20 * X3/max(X3, na.rm=TRUE), group=X2)) +
geom_line(size=0.05) +
@subfuzion
subfuzion / global-gitignore.md
Last active March 19, 2025 14:23
Global gitignore

There are certain files created by particular editors, IDEs, operating systems, etc., that do not belong in a repository. But adding system-specific files to the repo's .gitignore is considered a poor practice. This file should only exclude files and directories that are a part of the package that should not be versioned (such as the node_modules directory) as well as files that are generated (and regenerated) as artifacts of a build process.

All other files should be in your own global gitignore file:

  • Create a file called .gitignore in your home directory and add any filepath patterns you want to ignore.
  • Tell git where your global gitignore file is.

Note: The specific name and path you choose aren't important as long as you configure git to find it, as shown below. You could substitute .config/git/ignore for .gitignore in your home directory, if you prefer.