Skip to content

Instantly share code, notes, and snippets.

View alan-ma-umg's full-sized avatar
πŸš€
Let's GO!

Alan Ma alan-ma-umg

πŸš€
Let's GO!
View GitHub Profile
@alan-ma-umg
alan-ma-umg / add-update-github-access-token-on-mac.md
Last active October 3, 2020 21:28 — forked from jonjack/add-update-refresh-github-access-token-on-mac.md
Adding & Updating GitHub Access Token on Mac

As outlined here, there are a couple of situations where you need to authenticate with GitHub by using an Acces Token:-

  1. If you have Two-Factor Authentication (2FA) enabled.
  2. You are accessing an organisations protected content using SAML Single-Sign On (SSO).

Create an Access Token

In your GitHub account, go to Settings / Developer settings / Personal access tokens and select Generate New Token. Make a note of the token somewhere safe since this is the only chance you get to see it.

Add the token to your local OSX Key Chain

@alan-ma-umg
alan-ma-umg / gist:4596b90c03c631a163f0e627ef107bc7
Created August 15, 2019 23:41 — 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:
@alan-ma-umg
alan-ma-umg / loc-counter.sh
Last active August 15, 2019 19:08
LOC Counting for a Project
#~/bin/bash
# Run: sh loc-count.sh {your path}
# Must provide one parameter for the util to know your github repo folder
PROJECT_PATH=$1
cd $PROJECT_PATH
pwd
# include only desired file types
@alan-ma-umg
alan-ma-umg / remote_bash.sh
Created September 14, 2018 22:04 — forked from n0ts/remote_bash.sh
execute bash script from remote site
# http://stackoverflow.com/questions/5735666/execute-bash-script-from-url
bash <(curl -s http://mywebsite.com/myscript.txt)
# http://stackoverflow.com/questions/4642915/passing-parameters-to-bash-when-executing-a-script-fetched-by-curl
curl http://foo.com/script.sh | bash -s arg1 arg2
@alan-ma-umg
alan-ma-umg / PSQLVerticle.java
Created August 24, 2018 04:10 — forked from pmlopes/PSQLVerticle.java
Using PostgreSQL JSON with Vert.x3
package io.vertx.blog;
import io.vertx.core.AbstractVerticle;
import io.vertx.core.http.HttpServerResponse;
import io.vertx.core.json.JsonArray;
import io.vertx.core.json.JsonObject;
import io.vertx.ext.jdbc.JDBCClient;
import io.vertx.ext.sql.SQLConnection;
import io.vertx.ext.web.Router;
import io.vertx.ext.web.handler.BodyHandler;
@alan-ma-umg
alan-ma-umg / gzip.go
Created November 12, 2017 22:54 — forked from xDarkicex/gzip.go
Example of caching and gzip, httprouter
package gzip
import (
"compress/gzip"
"io"
"net/http"
"strings"
"github.com/julienschmidt/httprouter"
)