Skip to content

Instantly share code, notes, and snippets.

@uqmessias
uqmessias / countries-names-and-flags-in-portuguese-brazil-pt-br.md
Last active August 1, 2024 18:39
The list of all (or almost all) countries with their names and flag codes in brazilian portuguese (pt-br) and english — Lista de todos (ou quase todos) os países com seus nome e códigos de bandeiras em português brasileiro (pt-br) e inglês.
var countriesInPortugueseBR = [
    {
      flag: 'af',
      nameEn: 'Afghanistan',
      namePt: 'Afeganistão',
    },
    {
      flag: 'za',
{"lastUpload":"2021-03-11T08:02:06.409Z","extensionVersion":"v3.4.3"}
@aspina7
aspina7 / base_map_example
Last active January 21, 2020 22:17
Base-map plotting offline with {ggspatial}. Current issue is that it will only download tiles if you plot something on top, which makes it not as useful as a standalone. And the res in general. Would also be nice to be able to chuck in coords or a bbox.
## Installing required packages for this template
required_packages <- c("here", # find your files
"dplyr", # clean/shape data
"ggplot2", # create plots and charts
"sf", # encode spatial vector data
"raster", # get and plot GADM shapefiles
"ggspatial") # get and plot base maps
@leodc
leodc / download_csv.conf
Created November 21, 2019 00:17
NGINX config to download files
server {
listen 80;
server_name default_server;
location ~ ^.*/(?P<request_basename>[^/]+\.(csv))$ {
root /www/data/;
add_header Content-Disposition 'attachment; filename="$request_basename"';
}
}
@obrl-soil
obrl-soil / tilt_stack_sf.R
Last active December 7, 2023 15:29
Tilted and stacked maps with sf
# further to https://urbandemographics.blogspot.com/2016/04/creating-tilted-and-stacked-maps-in-r.html,
# an sf-friendly approach.
library(sf)
nc <- st_read(system.file('shape/nc.shp', package = 'sf'))
plot(nc)
sm <- matrix(c(2, 1.2, 0, 1), 2, 2)

App Install Plan

Critical

@strengejacke
strengejacke / .lintr
Last active September 28, 2025 02:44
VS Code setup for R
// save to windows-user directory
linters: with_defaults(object_name_linter = NULL,
object_length_linter(50),
commented_code_linter = NULL,
object_usage_linter = NULL,
line_length_linter(120),
cyclocomp_linter = cyclocomp_linter(50))
@JosiahParry
JosiahParry / keybindings.json
Last active August 17, 2024 00:46
Positron Keybindings
// Place your key bindings in this file to override the defaults
[
{
"key": "shift+cmd+b",
"command": "workbench.action.tasks.runTask",
"args": "Build R package",
"when": "isRPackage"
},
{
"key": "shift+cmd+enter",