Skip to content

Instantly share code, notes, and snippets.

Jermie Domingo undrafted

Block or report user

Report or block undrafted

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
undrafted / gist:8fa86d7b4dfcf0d6999913b8a0cbe9e5
Created May 15, 2020 — forked from rxaviers/gist:7360908
Complete list of github markdown emoji markup
View gist:8fa86d7b4dfcf0d6999913b8a0cbe9e5


: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:
View leetz.ts
// Given a string containing digits from 2-9 inclusive, return all possible letter combinations that the number could represent.
// A mapping of digit to letters (just like on the telephone buttons) is given below. Note that 1 does not map to any letters.
// Example:
// Input: "23"
// Output: ["ad", "ae", "af", "bd", "be", "bf", "cd", "ce", "cf"].
// Note:
// Although the above answer is in lexicographical order, your answer could be in any order you want.
View ammend-old-commit
You can use git rebase. For example, if you want to modify commit bbc643cd, run
$ git rebase --interactive 'bbc643cd^'
Please note the caret ^ at the end of the command, because you need actually to rebase back to the commit before the one you wish to modify.
In the default editor, modify pick to edit in the line mentioning 'bbc643cd'.
Save the file and exit: git will interpret and automatically execute the commands in the file. You will find yourself in the previous situation in which you just had created commit bbc643cd.
undrafted /
Created Mar 11, 2020
Use env variables in package.json
"scripts": {
"e2e:staging": "yarn run $(grep API_KEY .env | cut -d '=' -f2)",
View preload-lazy.js
const preloadLazy = (dynamicImport) => {
let promise;
function load() {
if(!promise) {
promise = dynamicImport();
return promise;
const component = React.lazy(load);
View preload-image.ts
export const preloadImage = (url: string) => {
return new Promise(resolve => {
const img = document.createElement('img');
img.src = url;
img.onload = () => resolve(src);
View remove-svg-whitespace.js
const svg = document.querySelector("svg");
const bbox = svg.getBBox();
svg.setAttribute("viewBox", [bbox.x, bbox.y, bbox.width, bbox.height].join(" "));
You can’t perform that action at this time.