Skip to content

Instantly share code, notes, and snippets.

View jonathanmorgan's full-sized avatar

Jonathan Morgan jonathanmorgan

View GitHub Profile
@jonathanmorgan
jonathanmorgan / git-multi-status.sh
Last active April 12, 2022 15:06 — forked from c0wfunk/git-multi-status.sh
Script for checking git status of many git repositories
#!/bin/bash
# usage: $0 source_dir [source_dir] ...
# where source_dir args are directories containing git repositories
red="\033[00;31m"
green="\033[00;32m"
yellow="\033[00;33m"
blue="\033[00;34m"
purple="\033[00;35m"
@jonathanmorgan
jonathanmorgan / fix-wsl2-dns-resolution
Created December 23, 2021 01:59 — forked from coltenkrauter/fix-wsl2-dns-resolution
Fix DNS resolution in WSL2
More recent resolution:
1. cd ~/../../etc (go to etc folder in WSL).
2. echo "[network]" | sudo tee wsl.conf (Create wsl.conf file and add the first line).
3. echo "generateResolvConf = false" | sudo tee -a wsl.conf (Append wsl.conf the next line).
4. wsl --terminate Debian (Terminate WSL in Windows cmd, in case is Ubuntu not Debian).
5. cd ~/../../etc (go to etc folder in WSL).
6. sudo rm -Rf resolv.conf (Delete the resolv.conf file).
7. In windows cmd, ps or terminal with the vpn connected do: Get-NetIPInterface or ipconfig /all for get the dns primary and
secondary.
@jonathanmorgan
jonathanmorgan / README.MD
Created July 1, 2016 12:48 — forked from aanastasiou/README.MD
Generate a Cypher query to store a Python Networkx directed graph

Exporting a Networkx graph as a Cypher query

This little project defines a function that can be used to construct a Cypher query which when executed against a Neo4j database server will store the graph to the server.

Background

  • A Graph is an abstract mathematical model composed of Nodes connected through Edges that can be used to describe complex systems composed of a set of parts (corresponding to nodes) and their connections (corresponding to edges).
  • Examples of graphs are road networks (junctions connected via roads), electronic circuit networks (components and their connections) and others
  • Networkx is an excellent Python module for manipulating such Graph objects of any kind.
  • Neo4j is a graph database. It uses the Graph as a data model to store such objects to a data store.
@jonathanmorgan
jonathanmorgan / databases_and_python-sqlite3.ipynb
Last active January 12, 2017 11:30
Databases and Python - SQLite 3
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@jonathanmorgan
jonathanmorgan / good_coding_habits.ipynb
Last active September 1, 2015 07:49
Big Data Basics - Good Coding Habits
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@jonathanmorgan
jonathanmorgan / intro_to_python.ipynb
Last active February 2, 2019 21:44
Big Data Basics - Intro to Python 2
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@jonathanmorgan
jonathanmorgan / tools-ipython_jupyter.ipynb
Last active November 20, 2020 11:37
Big Data Basics - tools - IPython and Jupyter
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@jonathanmorgan
jonathanmorgan / tools-unix_shell_and_commands.ipynb
Last active January 12, 2017 11:30
Big Data Basics - tools - Unix shell and commands overview
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@jonathanmorgan
jonathanmorgan / Visualization-matplotlib.ipynb
Last active January 12, 2017 11:30
Visualization in Python using matplotlib
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@jonathanmorgan
jonathanmorgan / Prepping_data_for_analysis.ipynb
Created April 2, 2015 07:40
Prepping_data_for_analysis
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.