Skip to content

Instantly share code, notes, and snippets.

Ian Young ijy

Block or report user

Report or block ijy

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@ijy
ijy / gitcom.md
Created May 7, 2018 — forked from jedmao/gitcom.md
Common git commands in a day-to-day workflow
View gitcom.md

Git Cheat Sheet

Initial Setup

Initialize a repo

Create an empty git repo or reinitialize an existing one

$ git init
@ijy
ijy / multiple-push-urls.md
Created May 7, 2018 — forked from bjmiller121/multiple-push-urls.md
Add multiple push URLs to a single git remote
View multiple-push-urls.md

Sometimes you need to keep two upstreams in sync with eachother. For example, you might need to both push to your testing environment and your GitHub repo at the same time. In order to do this simultaneously in one git command, here's a little trick to add multiple push URLs to a single remote.

Once you have a remote set up for one of your upstreams, run these commands with:

git remote set-url --add --push [remote] [original repo URL]
git remote set-url --add --push [remote] [second repo URL]

Once set up, git remote -v should show two (push) URLs and one (fetch) URL. Something like this:

@ijy
ijy / banner.css
Created Mar 20, 2018
Tailwind, postcss-import, & cssnext media queries
View banner.css
.c-banner {
...
height: 400px;
outline: 5px solid red;
/* Breakpoints ========================================================= */
@media (--tablet) {
height: 500px;
}
@ijy
ijy / ensure-cert-macos.sh
Created Dec 1, 2017 — forked from koop/ensure-cert-macos.sh
Ensures a certificate is in the macOS system keychain.
View ensure-cert-macos.sh
#!/bin/bash
# Usage
# $ ./install-cert-macos.sh "/path/to/cert"
CERT_PATH="$1"
# First, grab the SHA-1 from the provided SSL cert.
CERT_SHA1=$(openssl x509 -in "$CERT_PATH" -sha1 -noout -fingerprint | cut -d "=" -f2 | sed "s/://g")
# Next, grab the SHA-1s of any standard.dev certs in the keychain.
# Don't return an error code if nothing is found.
@ijy
ijy / portal.md
Created Nov 26, 2017 — forked from glinton/portal.md
Portal as an SSL terminator for `nanobox run`
View portal.md

Download portal for your OS.

Create a config file for portal

config.json

{
 "db-connection": "scribble:///tmp/portal",
 "log-level": "info",
 "server": true,
 "just-proxy": true
View ngrok-installation.md

#Installing ngrok on OSX

  1. Download ngrok
  2. Unzip it to your Applications directory
  3. Create a symlink (instructions below)

Creating a symlink to ngrok

Run the following two commands in Terminal to create the symlink.

# cd into your local bin directory
@ijy
ijy / crontab_helper
Created Aug 17, 2016 — forked from khalwat/crontab_helper
Never struggle with editing your crontab again; put this in the beginning of each of your crontabs
View crontab_helper
# * * * * * command to execute
# ┬ ┬ ┬ ┬ ┬
# │ │ │ │ │
# │ │ │ │ │
# │ │ │ │ └───── day of week (0 - 6) (0 to 6 are Sunday to Saturday, or use names)
# │ │ │ └────────── month (1 - 12)
# │ │ └─────────────── day of month (1 - 31)
# │ └──────────────────── hour (0 - 23)
# └───────────────────────── min (0 - 59)
@ijy
ijy / app.js
Last active Aug 29, 2015 — forked from clineamb/app.js
View app.js
/*
* Nunjucks + Express
* I couldn't find anything that helped me setup the enviornment
* correctly for these in the latest vesion of Express 4 (at the time
* of writing this).
*
* This Gist for those that want to keep using Nunjucks with Express 4.
* This also goes over working with a Nunjucks environment to use custom
* filters, extensions, etc.
*
View truecrypt_fix.bash
#!/bin/bash
libs=( "/usr/local/lib/libmacfuse_i32.2.dylib" \
"/usr/local/lib/libosxfuse_i32.2.dylib" \
"/usr/local/lib/libosxfuse_i64.2.dylib" \
"/usr/local/lib/libmacfuse_i64.2.dylib" \
"/usr/local/lib/libosxfuse_i32.la" \
"/usr/local/lib/libosxfuse_i64.la" \
"/usr/local/lib/pkgconfig/osxfuse.pc" )
@ijy
ijy / xslt-hyperlink-creator.xml
Created Jan 12, 2014
Converts any plain text URL strings into HTML formatted hyperlinks.
View xslt-hyperlink-creator.xml
You can’t perform that action at this time.