Skip to content

Instantly share code, notes, and snippets.

@tylermorganwall
tylermorganwall / humanity_globe.R
Created August 17, 2021 14:37
3D Humanity Globe
library(rayshader)
library(rayrender)
popdata = raster::raster("gpw_v4_population_density_rev11_2020_15_min.tif")
population_mat = rayshader:::flipud(raster_to_matrix(popdata))
above1 = population_mat > 1
above5 = population_mat > 5
above10 = population_mat > 10
library(tidycensus)
library(ggiraph)
library(tidyverse)
library(patchwork)
vt_income <- get_acs(
geography = "county",
variables = "B19013_001",
state = "VT",
year = 2019,
@herpiko
herpiko / vortextab75.md
Last active March 8, 2025 18:06
Vortex Tab 75 Programming

Programming

  • Plug in the cable, you need the LED to guide you
  • Pn + Left Ctrl to enter programming mode
  • Press the key that want to be programmed
  • Press the target key
  • Pn to apply
  • Pn + Left Ctrl to exit

It's possible to lose a key. Sometimes you need to backup it first.

@craigphicks
craigphicks / dtdotool.sh
Last active December 27, 2020 08:04
Used in Ubuntu 18.04 to manipulate desktops as atomic elements of an array, e.g., swapping element order, inserting and deleting empty elements.
#!/bin/bash
# Copyright (c) 2019, Craig P Hicks
# content licensed as CC BY-NC-SA
# CC BY-NC-SA details at https://creativecommons.org/licenses/by-nc-sa/4.0/legalcode
# This program depends upon 'xdotool' installed as Ubuntu 18.04 managed package
# xdotool project source can be found at:
# https://github.com/jordansissel/xdotool
# https://www.semicomplete.com/projects/xdotool/
@seignovert
seignovert / zenodo-doi-first-badge.md
Created February 21, 2019 20:02
Setup Zenodo DOI badge before the first release

Setup Zenodo DOI badge before the first release

Zenodo doi badge

Before submitting your first release, identify your Github repo id on Github API at:

https://api.github.com/repos/{user}/{repo}
@amit-chahar
amit-chahar / download-script.sh
Last active February 20, 2023 12:57
Scirpt to download files from Google drive using curl (Detailed explanation can be read here: https://stackoverflow.com/a/49444877/4043524)
#!/bin/bash
fileid="FILEIDENTIFIER"
filename="FILENAME"
curl -c ./cookie -s -L "https://drive.google.com/uc?export=download&id=${fileid}" > /dev/null
curl -Lb ./cookie "https://drive.google.com/uc?export=download&confirm=`awk '/download/ {print $NF}' ./cookie`&id=${fileid}" -o ${filename}
@mdonkers
mdonkers / server.py
Last active April 4, 2025 13:11
Simple Python 3 HTTP server for logging all GET and POST requests
#!/usr/bin/env python3
"""
License: MIT License
Copyright (c) 2023 Miel Donkers
Very simple HTTP server in python for logging requests
Usage::
./server.py [<port>]
"""
from http.server import BaseHTTPRequestHandler, HTTPServer
@mbostock
mbostock / .block
Last active November 13, 2016 21:45
U.S. Atlas, Redux [UNLISTED]
license: bsd-3-clause
@RobertMyles
RobertMyles / Load-Multiple-R-Packages.R
Created July 8, 2016 19:19
Load multiple packages at the same time in R
# library() or require() only load one package at a time
# but...
Packages <- c("dplyr", "ggplot2", "rstan", "readr")
lapply(Packages, library, character.only = TRUE)
# this loads as many as you put in 'Packages'. They need to be installed first, of course.
@endolith
endolith / clickbait.txt
Last active July 25, 2018 05:18
Adblock ublock distractions and clickbait filter
[Adblock Plus 2.0]
! Version:
! Title: Distractions and clickbait filter
! Last modified: 2018-07-24
! Expires: 7 days (update frequency)
! Homepage: https://github.com/endolith/clickbait
! Redirect: https://raw.githubusercontent.com/endolith/clickbait/master/clickbait.txt
! This URL: https://raw.githubusercontent.com/endolith/clickbait/master/clickbait.txt
! License: https://github.com/endolith/clickbait/blob/master/LICENSE.txt