Skip to content

Instantly share code, notes, and snippets.

View ggrumbley's full-sized avatar

Gary Grumbley ggrumbley

View GitHub Profile
@ggrumbley
ggrumbley / capybara cheat sheet
Created November 19, 2015 19:31 — forked from zhengjia/capybara cheat sheet
capybara cheat sheet
=Navigating=
visit('/projects')
visit(post_comments_path(post))
=Clicking links and buttons=
click_link('id-of-link')
click_link('Link Text')
click_button('Save')
click('Link Text') # Click either a link or a button
click('Button Value')
@ggrumbley
ggrumbley / introrx.md
Created November 20, 2015 15:18 — forked from staltz/introrx.md
The introduction to Reactive Programming you've been missing
@ggrumbley
ggrumbley / bootstrap-navbar.slim
Created November 23, 2015 22:40 — forked from rex/bootstrap-navbar.slim
Default Twitter Bootstrap nav bar, in the Slim templating language
nav.navbar.navbar-default role="navigation"
.container-fluid
/! Brand and toggle get grouped for better mobile display
.navbar-header
button.navbar-toggle data-target="#bs-example-navbar-collapse-1" data-toggle="collapse" type="button"
span.sr-only Toggle navigation
span.icon-bar
span.icon-bar
span.icon-bar
a.navbar-brand href="#" Brand
<!DOCTYPE html>
<html>
<head>
<script src="https://cdnjs.cloudflare.com/ajax/libs/rxjs/4.0.6/rx.all.js"></script>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
</head>
<body>
<div id="app"></div>
@ggrumbley
ggrumbley / mysql2sqlite.sh
Last active January 10, 2017 22:37 — forked from esperlu/mysql2sqlite.sh
MySQL to Sqlite converter
#!/bin/sh
# SQL DUMP = $ mysqldump --skip-create-options --compatible=ansi --skip-extended-insert --compact \
# --single-transaction -u root <mydb> > <newdb>.sql
#
#
# Converts a mysqldump file into a Sqlite 3 compatible file. It also extracts the MySQL `KEY xxxxx` from the
# CREATE block and create them in separate commands _after_ all the INSERTs.
# Awk is choosen because it's fast and portable. You can use gawk, original awk or even the lightning fast mawk.
@ggrumbley
ggrumbley / oreilly.py
Created February 1, 2017 19:48 — forked from nhumrich/oreilly.py
get free o'reilly books
"""Script to download free O'Reilly ebooks."""
import asyncio
import os
import re
import sys
import aiohttp
filename_matcher = re.compile(r'http://www.oreilly.com/(.*)/free/(.*).csp')
session = None
@ggrumbley
ggrumbley / Update-branch.md
Created September 15, 2017 14:33 — forked from santisbon/Update-branch.md
Bring your feature branch up to date with master. Deploying from Git branches adds flexibility. Bring your branch up to date with master and deploy it to make sure everything works. If everything looks good the branch can be merged. Otherwise, you can deploy your master branch to return production to its stable state.

Updating a feature branch

First we'll update your local master branch. Go to your local project and check out the branch you want to merge into (your local master branch)

$ git checkout master

Fetch the remote, bringing the branches and their commits from the remote repository. You can use the -p, --prune option to delete any remote-tracking references that no longer exist in the remote. Commits to master will be stored in a local branch, remotes/origin/master

@ggrumbley
ggrumbley / sql-mongo_comparison.md
Created October 2, 2017 17:03 — forked from aponxi/sql-mongo_comparison.md
MongoDb Cheat Sheets

SQL to MongoDB Mapping Chart

SQL to MongoDB Mapping Chart

In addition to the charts that follow, you might want to consider the Frequently Asked Questions section for a selection of common questions about MongoDB.

Executables

The following table presents the MySQL/Oracle executables and the corresponding MongoDB executables.

@ggrumbley
ggrumbley / gist:3b6d840ba6cf43963ff39e5e922655b4
Created October 3, 2017 17:05 — forked from CristinaSolana/gist:1885435
Keeping a fork up to date

1. Clone your fork:

git clone git@github.com:YOUR-USERNAME/YOUR-FORKED-REPO.git

2. Add remote from original repository in your forked repository:

cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
@ggrumbley
ggrumbley / gist:de52a8d36ec3bfae17eb8cd0297f318e
Created October 3, 2017 17:05 — forked from CristinaSolana/gist:1885435
Keeping a fork up to date

1. Clone your fork:

git clone git@github.com:YOUR-USERNAME/YOUR-FORKED-REPO.git

2. Add remote from original repository in your forked repository:

cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream