Skip to content

Instantly share code, notes, and snippets.

@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 / 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
@jean
jean / addScriptsToPackage.ts
Created February 20, 2016 17:15 — forked from jon49/addScriptsToPackage.ts
Use yaml for npm command line scripts and merge with package.json
import r = require('ramda')
import yaml = require('js-yaml')
import {readFile, writeFile} from 'fs'
var package = require('../package.json')
readFile('../scripts.yml', 'utf-8', (err, file) => {
if (err) {
console.log('Error reading scripts.yml', err)
return process.exit(1)
@jean
jean / Beginner-friendly Python Open Source Projects
Created November 5, 2015 11:47 — forked from ossanna16/Beginner-friendly Python Open Source Projects
This is a list of beginner-friendly Python open source projects. I'm always looking for new projects to add to my list, if you have an idea please tweet me at @ossanna16 :)
* OpenHatch - https://openhatch.org/search/?q=&language=Python
* PyLadies - https://github.com/pyladies
* New Coder - https://github.com/econchick/new-coder
* Django Girls - https://github.com/DjangoGirls
* Matplotlib - https://github.com/matplotlib/matplotlib
* Hylang - http://docs.hylang.org/en/latest/, https://github.com/hylang/hy
* Open Slides (Django) - http://openslides.org/
* Zeeguu - https://zeeguu.unibe.ch
* Project Jupyter - https://github.com/jupyter
* nbgrader - https://github.com/jupyter/nbgrader
@jean
jean / testdb2.xml
Last active December 27, 2015 15:49 — forked from fulv/gist:7311639
<plominodatabase id="testdb2">
<design>
<dbsettings version="1.18">
<AboutDescription type="Products.Archetypes.Field.TextField"><![CDATA[]]></AboutDescription>
<UsingDescription type="Products.Archetypes.Field.TextField"><![CDATA[]]></UsingDescription>
<IndexAttachments type="Products.Archetypes.Field.BooleanField">False</IndexAttachments>
<FulltextIndex type="Products.Archetypes.Field.BooleanField">True</FulltextIndex>
<IndexInPortal type="Products.Archetypes.Field.BooleanField">False</IndexInPortal>
<debugMode type="Products.Archetypes.Field.BooleanField">False</debugMode>
<CountDocuments type="Products.Archetypes.Field.BooleanField">False</CountDocuments>
@jean
jean / testdb.xml
Created November 1, 2013 05:01 — forked from fulv/testdb.xml
<plominodatabase id="testdb">
<design>
<dbsettings version="1.18">
<AboutDescription type="Products.Archetypes.Field.TextField"><![CDATA[]]></AboutDescription>
<UsingDescription type="Products.Archetypes.Field.TextField"><![CDATA[]]></UsingDescription>
<IndexAttachments type="Products.Archetypes.Field.BooleanField">False</IndexAttachments>
<FulltextIndex type="Products.Archetypes.Field.BooleanField">True</FulltextIndex>
<IndexInPortal type="Products.Archetypes.Field.BooleanField">False</IndexInPortal>
<debugMode type="Products.Archetypes.Field.BooleanField">False</debugMode>
<CountDocuments type="Products.Archetypes.Field.BooleanField">False</CountDocuments>
@jean
jean / Traceback
Created October 7, 2013 09:14 — forked from ivanteoh/Traceback
Traceback (innermost last):
Module ZPublisher.Publish, line 126, in publish
Module ZPublisher.mapply, line 77, in mapply
Module ZPublisher.Publish, line 46, in call_object
Module <string>, line 4, in manage_importFromXML
Module AccessControl.requestmethod, line 70, in _curried
Module Products.CMFPlomino.PlominoReplicationManager, line 1384, in manage_importFromXML
Module <string>, line 5, in importFromXML
Module AccessControl.requestmethod, line 70, in _curried
Module Products.CMFPlomino.PlominoReplicationManager, line 1412, in importFromXML