Skip to content

Instantly share code, notes, and snippets.

View longtimeago's full-sized avatar

Paul Polishchuk longtimeago

View GitHub Profile
@endolith
endolith / export_google_starred_locations.py
Created October 16, 2012 02:29
Export Google Maps starred locations
# -*- coding: utf-8 -*-
"""
Go to Google Bookmarks: https://www.google.com/bookmarks/
On the bottom left, click "Export bookmarks": https://www.google.com/bookmarks/bookmarks.html?hl=en
After downloading the html file, run this script on it to generate a KML.
"""
@lttlrck
lttlrck / gist:9628955
Created March 18, 2014 20:34
rename git branch locally and remotely
git branch -m old_branch new_branch # Rename branch locally
git push origin :old_branch # Delete the old branch
git push --set-upstream origin new_branch # Push the new branch, set local branch to track the new remote
/*
The MIT License (MIT)
Copyright (c) 2016 Paul Polishchuk
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
@pierrejoubert73
pierrejoubert73 / markdown-details-collapsible.md
Last active June 19, 2024 00:04
How to add a collapsible section in markdown.

How to add a collapsible section in markdown

1. Example

Click me

Heading

  1. Foo
  2. Bar
    • Baz
  • Qux
@dentys
dentys / wiremock-cert.md
Last active October 13, 2023 12:01
Wiremock with trusted self signed certificate

1. Create a self signed certificate, explicitly specify connection source dns (localhost) name and ip (0.0.0.0).

This allows client to use https://localhost or https://0.0.0.0

keytool -genkey -alias profiler -keyalg RSA -keysize 1024 -validity 1365 -keypass password -keystore wiremock.jks -storepass password -ext SAN=dns:localhost,ip:0.0.0.0

As a result there is a private/public key pair in wiremock.jks keystore

2. Start wiremock with https enabled and custom keystore