Skip to content

Instantly share code, notes, and snippets.

View enigmoe's full-sized avatar

Moritz Zajonz enigmoe

View GitHub Profile
@rogerallen
rogerallen / us_state_abbrev.py
Last active April 19, 2024 14:04
A Python Dictionary to translate US States to Two letter codes
# United States of America Python Dictionary to translate States,
# Districts & Territories to Two-Letter codes and vice versa.
#
# Canonical URL: https://gist.github.com/rogerallen/1583593
#
# Dedicated to the public domain. To the extent possible under law,
# Roger Allen has waived all copyright and related or neighboring
# rights to this code. Data originally from Wikipedia at the url:
# https://en.wikipedia.org/wiki/ISO_3166-2:US
#
@briantjacobs
briantjacobs / storytelling_from_space.md
Last active February 18, 2024 10:02
Storytelling from Space

Storytelling from Space: Tools/Resources

This list of resources is all about acquring and processing aerial imagery. It's generally broken up in three ways: how to go about this in Photoshop/GIMP, using command-line tools, or in GIS software, depending what's most comfortable to you. Often these tools can be used in conjunction with each other.

Acquiring Landsat & MODIS

Web Interface

  • Landsat archive
@kennwhite
kennwhite / vpn_psk_bingo.md
Last active February 24, 2024 12:19
Most VPN Services are Terrible

Most VPN Services are Terrible

Short version: I strongly do not recommend using any of these providers. You are, of course, free to use whatever you like. My TL;DR advice: Roll your own and use Algo or Streisand. For messaging & voice, use Signal. For increased anonymity, use Tor for desktop (though recognize that doing so may actually put you at greater risk), and Onion Browser for mobile.

This mini-rant came on the heels of an interesting twitter discussion: https://twitter.com/kennwhite/status/591074055018582016

@PurpleBooth
PurpleBooth / README-Template.md
Last active May 24, 2024 06:43
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

@maglietti
maglietti / gistColaboration.md
Created August 21, 2015 16:33
How to collaborate on a gist

To colaborate on a gist:

  1. Clone your gist repo locally
  2. Add your friend’s fork as a remote e.g. if your friend is named Cindy: git remote add-url cindy https://gist.github.com/cindy/df03bdacaef75a80f310
  3. Fetch your friend’s commits: git fetch cindy/master
  4. Merge your friend’s changes into your repo: git merge cindy/master
  5. Push the changes back to GitHub: git push origin/master

Simple Security Guidelines

Using an iDevice? (Best option)

  • Use an iPod or an iPad without a SIM card
  • Use an iPhone
  • Do not jailbreak
  • Always upgrade to new iOS versions
  • Use Brave browser

Need Secure chat?

@rafapereirabr
rafapereirabr / life_expect_world_map_gif.md
Last active November 15, 2020 06:31
creating an animated (gif) world map of life expectancy using ggplot2

This gist shows how to create an animated world map of life expectancy using R. The data comes the UN World Population Prospects, 2015 Revision, and it brings life expectancy data from 1950 untill 2015 and projeceted data up to 2100. Thanks Topi Tjukanov, who reminded me of the UN DESA data portal, where you can find this dataset and many others

The idea is to use open data to create a GIF, much like the ones created by Aron Strandberg but his maps look much nicer. The output of this script is a map like this one:

[![enter image description here][1]][1]

Now diving into the code. First, let's load the necessary libraries and get the data. As of this writing, the current version of gganimate has a bug that messes the aesthetics of the .gif file. As a temporary solution, I've intalled an older version of the package, [as recommended by the author of the gganimate, David Ro

@Prof9
Prof9 / Readme.md
Last active February 1, 2024 07:02
THIS SCRIPT NO LONGER WORKS! Twitter has rolled out a fix for the web client hack. (Original text: Force enable cramming (280 character tweets) on Twitter. Use TamperMonkey. NOTE: Stops working when you switch pages, refresh to fix.)

As of 7 November 2017 everyone has access to 280 characters in supported clients, so you no longer need this script!

@hencjo
hencjo / gist:0710d51c5ba51e0aeb2d905f1e3a38f3
Created February 13, 2018 13:27
Xorg: Two keyboards with different keyboard layout.
# Use xinput to find your keyboards.
$ xinput
⎡ Virtual core pointer id=2 [master pointer (3)]
⎜ ↳ Virtual core XTEST pointer id=4 [slave pointer (2)]
⎜ ↳ SynPS/2 Synaptics TouchPad id=11 [slave pointer (2)]
⎜ ↳ TPPS/2 IBM TrackPoint id=12 [slave pointer (2)]
⎜ ↳ Logitech Performance MX id=14 [slave pointer (2)]
⎜ ↳ E-Signal USB Gaming Keyboard id=16 [slave pointer (2)]
⎣ Virtual core keyboard id=3 [master keyboard (2)]
@benmarwick
benmarwick / analyse_large_text_file_chunked.R
Last active April 5, 2018 10:57
Use R to analyse a large text file that is too big to read in all at once
library(chunked)
library(tidyverse)
# I want to look at the daily page views of Wikipedia articles
# before 2015... I can get zipped log files
# from here: https://dumps.wikimedia.org/other/pagecounts-ez/merged/2012/2012-12/
# I get bz file, unzip to get this:
my_file <- 'pagecounts-2012-12-14/pagecounts-2012-12-14'