Skip to content

Instantly share code, notes, and snippets.

@j8jacobs
j8jacobs / get_iso_names_from_wiki.py
Last active August 24, 2022 02:36
Generate ISO Code CSV from Wiki link
# original link found here: https://gis.stackexchange.com/questions/1047/seeking-full-list-of-iso-alpha-2-and-iso-alpha-3-country-codes
import csv
import urllib.request as urllib2
from bs4 import BeautifulSoup
import sys
# helper function to get text and anchor tag text
# this removes the new line characters, connects all the elements of the column
def format_text(array):
return ''.join(array).strip()
@sualeh
sualeh / how_to_sign_and_release_to_the_central_repository_with_github_actions.md
Last active January 27, 2025 16:26
How to Sign and Release to The Central Repository with GitHub Actions

How to Sign and Release to The Central Repository with GitHub Actions

GitHub allows automated builds using GitHub Actions. A commonly asked question is how to release artifacts (packaged Java jars) built by Maven and Gradle to The Central Repository. The GitHub Actions documentation provides only part of the answer.

So, first, configure your Maven project for staging artifacts to The Central Repository, by reading through Configuring Your Project for Deployment and following those steps. Please make sure that the maven-gpg-plugin is configured to prevent gpg from using PIN entry programs, as follows:

<configuration>
  <gpgArguments>
      <arg>--pinentry-mode</arg>
 loopback
@anjia0532
anjia0532 / nginx.conf
Created December 14, 2017 04:08
nginx proxy_pass add a static parameter
worker_processes 1;
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
@DanHerbert
DanHerbert / fix-homebrew-npm.md
Last active November 27, 2024 13:36
Instructions on how to fix npm if you've installed Node through Homebrew on Mac OS X or Linuxbrew

OBSOLETE

This entire guide is based on an old version of Homebrew/Node and no longer applies. It was only ever intended to fix a specific error message which has since been fixed. I've kept it here for historical purposes, but it should no longer be used. Homebrew maintainers have fixed things and the options mentioned don't exist and won't work.

I still believe it is better to manually install npm separately since having a generic package manager maintain another package manager is a bad idea, but the instructions below don't explain how to do that.

Fixing npm On Mac OS X for Homebrew Users

Installing node through Homebrew can cause problems with npm for globally installed packages. To fix it quickly, use the solution below. An explanation is also included at the end of this document.

@moole
moole / GPS_coord_regexp
Created September 12, 2012 14:47
GPS coordinate regular expression
FLOAT NUMBER \f
((?:[\+-]?[0-9]*[\.,][0-9]+)|(?:[\+-]?[0-9]+))
DEGREE SEPARATOR \ds
[^ms'′"″,\.\dNEWnew]
MINUTE SEPARATOR \ms
[^ds°"″,\.\dNEWnew]
SECOND SEPARATOR \ss