Skip to content

Instantly share code, notes, and snippets.

View Borgaard's full-sized avatar

Nicole Borgaard Borgaard

  • General Assembly
  • San Francisco, CA
View GitHub Profile
@Borgaard
Borgaard / delete_git_submodule.md
Created January 31, 2019 19:52 — forked from myusuf3/delete_git_submodule.md
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
@Borgaard
Borgaard / git_submodules.md
Created January 31, 2019 19:49 — forked from gitaarik/git_submodules.md
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 advantages of using submodules:

  • You can separate the code into different repositories.
## How to hide API keys from github ##
1. If you have already pushed commits with sensitive data, follow this guide to remove the sensitive info while
retaining your commits: https://help.github.com/articles/remove-sensitive-data/
2. In the terminal, create a config.js file and open it up:
touch config.js
atom config.js
@Borgaard
Borgaard / cpu.ts
Created January 3, 2017 07:20 — forked from hath995/cpu.ts
class Memory {
data: number[];
constructor(data: number[]) {
}
set_location(location: number, value: number): Memory {
}
get_location(location: number): number {
@Borgaard
Borgaard / introrx.md
Created December 31, 2015 08:12 — forked from staltz/introrx.md
The introduction to Reactive Programming you've been missing
@Borgaard
Borgaard / fizzbuzz.c
Created October 10, 2015 19:27 — forked from anonymous/fizzbuzz.c
A FizzBuzz program. Somehow. I don't know why it works.
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <gmp.h>
char * polynomial="-74101463560860539810482394216134472786413399/404009590666424903383979388988167534591844018460526499864038804741201731572423877094984692537474105135297393596654648304117684895744000000000000000000000*x^99 + 1786563401621773217421750502452955853226339781/1943688752347061390850759947022111850270039951356484879070977067483444756705819339975871373032521468004867185688372878439054154137600000000000000000000*x^98 - 27321291157050372775340569532625689973429185264741/12024094960310264981666053243695462339042976739896622019763059664916718201560234437350734896948634081407660523709959770955883479040000000000000000000000*x^97 + 4936870031754926645682423836151042176171669450909/1336493173680525187613977630110369004256312194947800263402124063124652591386915768177479078216982141485276408003996973457735680000000000000000000000*x^96 - 24473118674386691114350902920738421254018653211816783/55093218603941649400531744530105211175454647
@Borgaard
Borgaard / README.md
Last active August 29, 2015 14:27 — forked from zenorocha/README.md
A template for Github READMEs (Markdown) + Sublime Snippet

Project Name

TODO: Write a project description

Installation

TODO: Describe the installation process

Usage

// 1: how could you rewrite the following to make it shorter?
if (foo) {
bar.doSomething(el);
} else {
bar.doSomethingElse(el);
}
<!DOCTYPE html>
<html lang="en">
<head>
<title>jQuery Practice</title>
</head>
<body>
<div id="content">
<div class="entry">
<h1>You Won't Believe What Happens When You Click This Link</h1>
<a href="#">Click me!</a>