Skip to content

Instantly share code, notes, and snippets.

@Tinyik
Tinyik / gist:87001fb89ad5c167d990e795465b9f0f
Created May 21, 2018 03:57
Jupyter notebook allow remote connection
c = get_config()
c.IPKernelApp.pylab = 'inline' # in-line figure when using Matplotlib
c.NotebookApp.ip = '*' # Serve notebooks locally.
c.NotebookApp.open_browser = False # Do not open a browser window by default when using notebooks.
@Tinyik
Tinyik / demo.swift
Created December 20, 2017 06:03
Hide/Show UINavigationBar on push/pop, without invalidating swipe back gesture
override func viewWillAppear(_ animated: Bool) {
super.viewWillAppear(animated)
self.navigationController?.setNavigationBarHidden(true, animated: true)
self.navigationController?.interactivePopGestureRecognizer?.delegate = nil
}
override func viewWillDisappear(_ animated: Bool) {
super.viewWillDisappear(animated)
if self.isMovingFromParentViewController {
self.navigationController?.setNavigationBarHidden(false, animated: true)