Skip to content

Instantly share code, notes, and snippets.

@ateucher
ateucher / setup-gh-cli-auth-2fa.md
Last active June 28, 2022 07:16
Setup git on the CLI to use 2FA with GitHub

These are instructions for setting up git to authenticate with GitHub when you have 2-factor authentication set up. This authentication should be inherited by any GUI client you are using. These are intentionally brief instructions, with links to more detail in the appropriate places.

  1. Download and install the git command-line client (if required).

  2. Open the git bash window and introduce yourself to git (if required):

    git config --global user.name 'Firstname Lastname'
    git config --global user.email 'firstname.lastname@gov.bc.ca'
    
@bartjacobs
bartjacobs / .gitignore
Last active January 2, 2016 17:09 — forked from adamgit/.gitignore
##############################################
# .gitignore for Xcode 5 Project #
# https://gist.github.com/bartjacobs/8334797 #
##############################################
# Temporary Files OS X
.DS_Store
*.swp
*.lock
@kennethlynne
kennethlynne / angular-mock-backend.js
Last active February 19, 2019 10:41
High fidelity prototyping using a mock back-end. Include angular-mocks in your script includes after angular. Demo: http://codepen.io/kennethlynne/pen/lJbce
'use strict';
angular.module('yourApp')
.constant('Config', {
viewDir: 'views/',
API: {
useMocks: true,
fakeDelay: 2000,
protocol: window.location.protocol.split(':')[0],
host: window.location.hostname,
@duncansmart
duncansmart / MailgunTest.cs
Created September 24, 2012 18:38
Send a mail message via Mailgun using HttpClient
using System.Net;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Threading.Tasks;
[TestFixture]
public class MyClass
{
const string DOMAIN = "samples.mailgun.org";
const string API_KEY = "key-...";
@jpoehls
jpoehls / gist:2030795
Created March 13, 2012 19:02
Using CTRL+W to close tabs in Visual Studio

In Tools | Options | Keyboard...

  1. Add CTRL+W as a Global shortcut for Window.CloseDocumentWindow
  2. Remove the CTRL+W shortcut for Edit.SelectCurrentWord

The caveat to this is if you are used to using CTRL+W to select the current word. If you do, find another shortcut that works for that.