Skip to content

Instantly share code, notes, and snippets.

Using an Access Token for the first time

Follow the instructions on Github to Create an Access Token in Github

Configure Git to use the osxkeychain

By default, git credentials are not cached so you need to tell Git if you want to avoid having to provide them each time Github requires you to authenticate. On Mac, Git comes with an “osxkeychain” mode, which caches credentials in the secure keychain that’s attached to your system account.

You can tell Git you want to store credentials in the osxkeychain by running the following:-

@nmip
nmip / gist:076d5e2a060dc7551767e602b5ed2e41
Created February 28, 2022 16:09 — forked from rxaviers/gist:7360908
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue:
@nmip
nmip / websocket-testing.js
Created February 19, 2022 16:04 — forked from kianaditya/websocket-testing.js
cypress test for websocket testing article
/// <reference types="Cypress" />
const manualWebSocket = require('manual-web-socket') // import the package
describe('Tests websocket', () => {
it('Successfully processes websocket message from server', () => {
cy.visit('/')
.get('[id=websocket]')
.should('have.text', 'websocket is closed')
cy.visit('/', {
onBeforeLoad(win) {
var script = win.document.createElement('script')
/*
This is a jQuery function that runs after the document has been fully rendered.
It expects a variable set by Showoff that defines the URL for filing a ticket:
issueUrl = "http://tickets.puppet.com/secure/CreateIssueDetails!init.jspa?pid=10302&issuetype=1&components=10312&priority=6&summary=";
This approach is taken so the link can fail gracefully. If I broke something, the
link will still operate normally, it just won't be the fancy dialog, and it won't
allow external users to file tickets.
@nmip
nmip / gist:179651c48d06a0c7477e31527f7d52ce
Created June 29, 2017 09:33 — forked from stuart11n/gist:9628955
rename git branch locally and remotely
git branch -m old_branch new_branch # Rename branch locally
git push origin :old_branch # Delete the old branch
git push --set-upstream origin new_branch # Push the new branch, set local branch to track the new remote