Skip to content

Instantly share code, notes, and snippets.

View motivic's full-sized avatar

Johnson Jia motivic

View GitHub Profile
@motivic
motivic / tmux_local_install.sh
Last active November 22, 2016 19:32 — forked from sharjeelsayed/tmux_local_install.sh
bash script for installing tmux without root access.Updated to include latest Tmux version and some other minor changes
#!/bin/bash
# Source: https://gist.github.com/ryin/3106801
# Script for installing tmux on systems where you don't have root access.
# tmux will be installed in $HOME/local/bin.
# It's assumed that wget and a C/C++ compiler are installed.
# Updated to install TMUX_VERSION 2.3 from https://tmux.github.io/
# exit on error
set -e
@motivic
motivic / .gitignore
Created August 23, 2016 18:40 — forked from octocat/.gitignore
Some common .gitignore configurations
# Compiled source #
###################
*.com
*.class
*.dll
*.exe
*.o
*.so
# Packages #
@motivic
motivic / convert.py
Created June 23, 2016 00:34 — forked from anderser/convert.py
Convert from NodeXL (via GraphML-format) to D3-ready json for force layout while adding modularity groups (communities) as attribute to nodes. Useful for coloring nodes via modularitygroup attribute. Requires networkx and python-louvain. First export as GraphML file from your NodeXL-sheet. Then run: >>> python convert.py -i mygraph.graphml -o ou…
#!/usr/bin/env python
import sys
import argparse
import networkx as nx
import community
from networkx.readwrite import json_graph
def graphmltojson(graphfile, outfile):