Skip to content

Instantly share code, notes, and snippets.

mattseymour / build-instructions
Created May 1, 2017
Build Python 3.6 from source for Ubuntu and Debian
View build-instructions
Prerequisties install:
- sudo apt-get install build-essential checkinstall
These are the dependancies required by python:
- sudo apt-get install libbz2-dev libc6-dev libgdbm-dev libncursesw5-dev libreadline-gplv2-dev libssl-dev libsqlite3-dev tk-dev
Download the tar source file from (at the time of writing 3.6.1 is the latest release):
- wget -O ~/Downloads/python3.6.1.tgz
Via command line navigate to the downloaded file directory:
mottosso /
Last active Oct 11, 2018
Nodes with unique IDs

Nodes with unique IDs in Maya associates a new ID to every DAG-node in the scene, does the same but keeps existing IDs as-is. Finally, updates IDs and ensures that no duplicate ID exists in the scene.

myusuf3 /
Created Nov 3, 2014
How effectively delete a git submodule.

To remove a submodule you need to:

  • Delete the relevant section from the .gitmodules file.
  • Stage the .gitmodules changes git add .gitmodules
  • Delete the relevant section from .git/config.
  • Run git rm --cached path_to_submodule (no trailing slash).
  • Run rm -rf .git/modules/path_to_submodule (no trailing slash).
  • Commit git commit -m "Removed submodule "
  • Delete the now untracked submodule files rm -rf path_to_submodule
danrigsby / packer-ami-id
Last active Jul 21, 2021
Get AMI ID from a packer build
View packer-ami-id
packer build packer.json 2>&1 | sudo tee output.txt
tail -2 output.txt | head -2 | awk 'match($0, /ami-.*/) { print substr($0, RSTART, RLENGTH) }' > sudo ami.txt
j8 / git_empty_branch
Created Feb 14, 2014
Create new branch with empty folder structure
View git_empty_branch
You can create a new empty branch like this:
$ git checkout --orphan NEWBRANCH
--orphan creates a new branch, but it starts without any commit. After running the above command you are on a new branch "NEWBRANCH", and the first commit you create from this state will start a new history without any ancestry.
The --orphan command keeps the index and the working tree files intact in order to make it convenient for creating a new history whose trees resemble the ones from the original branch.
Since you want to create a new empty branch that has nothing to do with the original branch, you can delete all files in the new working directory: