Skip to content

Instantly share code, notes, and snippets.

@jean
jean / sync.py
Last active February 7, 2021 22:09
Receive webhooks from GitHub and create or update pages in Notion
import os
from uuid import uuid1
from datetime import datetime
from wsgiref.simple_server import make_server
from pyramid.config import Configurator
from pyramid.view import view_config, view_defaults, notfound_view_config
from pyramid.response import Response
from notion.client import NotionClient
from notion.collection import NotionDate
@jean
jean / mosh-setup-guide.md
Last active May 16, 2020 12:30 — forked from marcwjj/mosh-setup-guide.md
Step by step guide to setup mosh ssh client to Google Cloud VM instance

A beginner's guide to setup Mosh roaming terminal on Mac to access Google Cloud Compute Engine instance

Being new to training ML models using Google Cloud VM instances, I faced issues where my ssh connection to the cloud instance (using either the clound web-based ssh client or using cloud shell) would disconnect from time to time (for example when I power off my laptop or the network gets disconnected) which would terminate the model training process. Therefore I searched for a ssh client that can handle disconnection and can resume connection without disrupting the process running on the server and came across with Mosh mobile shell, a remote terminal app that supports roaming.

It took me a while to figure out how to set up a third party ssh terminal using the google cloud OAuth. Here's a step-by-step guide:

Prerequisite

You should have created a Google Cloud VM instance (Compute Engine) and be able to ssh into the instance using the cloud, [using cloud console]

@jean
jean / second_gist
Last active June 19, 2018 04:43
Change content to demonstrate
demonstrate
@jean
jean / second_gist
Created June 17, 2018 05:28
Add a gist using tavern
Woohoo I added a gist using tavern!
@jean
jean / second_gist
Created June 17, 2018 05:26
Add a gist using tavern
Woohoo I added a gist using tavern!
@jean
jean / second_gist
Created June 17, 2018 05:25
Add a gist using tavern
Woohoo I added a gist using tavern!
@jean
jean / second_gist
Created June 17, 2018 05:20
Add a gist using tavern
Woohoo I added a gist using tavern!

Keybase proof

I hereby claim:

  • I am jean on github.
  • I am jeanj (https://keybase.io/jeanj) on keybase.
  • I have a public key ASCE-YlvXZ7gYs8Qi_PAq6Dm-SQ3CKUc0sblVxlb-NjCjAo

To claim this, I am signing this object:

@jean
jean / inventory.py
Created October 22, 2016 22:20 — forked from mearns/inventory.py
#! /usr/bin/env python
# vim: set fileencoding=utf-8:
""" Process URL for intersphinx targets and emit html or text """
def validuri(string):
return string
from sphinx.ext.intersphinx import read_inventory_v2
from posixpath import join
import pprint
@jean
jean / inventory.py
Created October 22, 2016 22:19 — forked from epc/inventory.py
python script to parse sphinx objects.inv file
#!/usr/bin/env python
""" Process URL for intersphinx targets and emit html or text """
def validuri(string):
return string
from sphinx.ext.intersphinx import read_inventory_v2
from posixpath import join
import pprint
import argparse