Skip to content

Instantly share code, notes, and snippets.

Graeham g4d

Block or report user

Report or block g4d

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
@ateucher
ateucher / setup-gh-cli-auth-2fa.md
Last active Oct 21, 2019
Setup git on the CLI to use 2FA with GitHub
View setup-gh-cli-auth-2fa.md

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'
    
View .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 Feb 19, 2019
High fidelity prototyping using a mock back-end. Include angular-mocks in your script includes after angular. Demo: http://codepen.io/kennethlynne/pen/lJbce
View angular-mock-backend.js
'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 Sep 24, 2012
Send a mail message via Mailgun using HttpClient
View MailgunTest.cs
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 Mar 13, 2012
Using CTRL+W to close tabs in Visual Studio
View gist:2030795

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.

You can’t perform that action at this time.