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 {
firebase.initializeApp(config);
var messageAppReference = firebase.database();
$(document).ready(function(){
$('#message-form').submit(function(event){
event.preventDefault();
console.log("ALLO??!?!")
var message = $('#message').val();
$('#message').val('');
@Borgaard
Borgaard / 05_hubot_instructions.md
Created August 25, 2016 03:15
Hubot Instructions for JSD3

Unit Project #1: Slackbot

Overview

We've been using Slack to communicate with each other for the first couple weeks of the class. Now it is time to build our very own Slackbot to add a fun interactive component to the chat room. A Slackbot is an integration into slack that can either respond to specific phrases that are mentioned in Slack or they can post things from outside of slack into a channel or private conversation. There are now entire startups built on top of Slackbots. For example, people have built Slackbots that let you hail an Uber from them or schedule meetings with different members of your team (where it searches your Google Calendar). One of the most popular Slackbots lets people post random gifs based on phrases into a channel from Giphy.

For our first project, we are going to keep things simple. We will build a Slackbot on top of the popular Github bot called [Hubot](https://github.com

Installing PostgreSQL

Go to the postgres documentation:
http://postgresapp.com/documentation/cli-tools.html
cd ~
open .bash_profile (if you're using zshell, use open .zshrc instead.)

Add this to the last line of your .bash_profile or .zshrc file:
export PATH=$PATH:/Applications/Postgres.app/Contents/Versions/latest/bin

rails new postgres_app --database=postgresql

@Borgaard
Borgaard / installbookmarklet.html
Last active January 14, 2016 05:14
bookmarklet
dropbox alternative
<html>
<style>
.timeColor {
color: gray;
margin-right: 5px;
}
.userColor {
color: orange;
margin-right: 5px;
}
@Borgaard
Borgaard / sochatty.html
Created January 3, 2016 05:57
All the chats
<html>
<body>
<div id="chat-window"></div>
<div id="chat-form">
<form id="formy">
<textarea name="chat-entry" id="chat-entry" cols="30" rows="2"></textarea>
<input type="submit" value="ChatzOr"></input>
</form>
</div>