Skip to content

Instantly share code, notes, and snippets.

@gitaarik
gitaarik / git_submodules.md
Last active May 4, 2024 11:10
Git Submodules basic explanation

Git Submodules basic explanation

Why submodules?

In Git you can add a submodule to a repository. This is basically a repository embedded in your main repository. This can be very useful. A couple of usecases of submodules:

  • Separate big codebases into multiple repositories.
@wch
wch / mynamespace.js
Last active March 28, 2021 14:07
Namespace example in Javascript. This also demonstrates the module pattern.
// mynamespace is an object to use as a namespace
mynamespace = (function() {
// Variables in the namespace
var mynamespace = {
foo: "Yes, this is foo."
};
// "Public" methods for the namespace
mynamespace.fooTwo = function() {
@lamberta
lamberta / vbox.sh
Created August 6, 2012 04:31
Convenience wrapper around VBoxManage for controlling VirtualBox virtual machines.
#!/usr/bin/env bash
# Convenience wrapper around VBoxManage for controlling VirtualBox virtual machines.
#
# Headless Ubuntu server gets stuck at boot menu on unsuccessful boots:
# http://serverfault.com/questions/243343/headless-ubuntu-server-machine-sometimes-stuck-at-grub-menu
function print_help {
echo "Usage: $(basename $0) [options] name"
echo "Easy control of VirtualBox virtual machines."
echo " -h Show this usage guide."
@valpackett
valpackett / 1_WTF.md
Created February 3, 2012 18:32
Kindle dictionary template

Kindle dictionary template

Use it with KindleGen

kindlegen dic.opf