Skip to content

Instantly share code, notes, and snippets.

Avatar
😎

Long Nguyen zcmgyu

😎
  • HumanCrest Co., Ltd
  • Vietnam
View GitHub Profile
@zcmgyu
zcmgyu / Keeping a fork up to date.md
Last active Dec 9, 2020 — forked from CristinaSolana/gist:1885435
Keeping a fork up to date
View Keeping a fork up to date.md

1. Clone your fork:

git clone git@github.com:YOUR-USERNAME/YOUR-FORKED-REPO.git

2. Add remote from original repository in your forked repository:

cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
@zcmgyu
zcmgyu / SetupESLintPritter.md
Last active Jul 23, 2020
Create React App + ESLint + Airbnb Javascript Style Guide + Prettier + VS Code
View SetupESLintPritter.md

Setup

Setup ESLint, Pritter, Airbnb JS Style in Create React App project with VS Code editor

  • Plugins: Prettier, Html, React Hooks

Prerequisites

Latest node, VSCode, npm, yarn

@zcmgyu
zcmgyu / test.js
Created Aug 22, 2019 — forked from icirellik/test.js
Pass data between beforeEach, afterEach and it in mocha tests.
View test.js
var expect = require('expect');
describe.only('Sample', function () {
beforeEach(function () {
this.currentTest.value = 'Winning!';
});
it('Uses current test data', function () {
expect(this.test.value).to.equal('Winning!');
View gist:51ad5cb03daa30f34b45ea8aebab82b6
[XCUITest] Launching WebDriverAgent on the device
[WebDriverAgent] Fetching dependencies
[WebDriverAgent] Installing/updating dependencies for platforms 'iOS', 'tvOS'
[debug] [WebDriverAgent] *** Checking out CocoaAsyncSocket at "7.6.3"
[debug] [WebDriverAgent] *** Checking out RoutingHTTPServer at "v1.0.2"
[debug] [WebDriverAgent] *** Checking out YYCache at "1.1.0"
[WebDriverAgent] Failed to check out repository into /usr/local/lib/node_modules/appium/node_modules/appium-webdriveragent/Carthage/Checkouts/CocoaAsyncSocket: Could not create working directory (Error Domain=NSCocoaErrorDomain Code=513 "You don’t have permission to save the file “CocoaAsyncSocket” in the folder “Checkouts”." UserInfo={NSFilePath=/usr/local/lib/node_modules/appium/node_modules/appium-webdriveragent/Carthage/Checkouts/CocoaAsyncSocket, NSUnderlyingError=0x7f9de412e4c0 {Error Domain=NSPOSIXErrorDomain Code=13 "Permission denied"}})
[debug] [BaseDriver] Event 'wdaStartFailed' logged at 1561741067516 (01:57:47 GMT+0900 (Japan Standar
@zcmgyu
zcmgyu / authorize.js
Created Jun 29, 2018 — forked from kndt84/authorize.js
Sample code: how to refresh session of Cognito User Pools with Node.js and Express
View authorize.js
const AWS = require('aws-sdk');
const CognitoUserPool = require('amazon-cognito-identity-js-node').CognitoUserPool;
const CognitoUserSession = require('amazon-cognito-identity-js-node').CognitoUserSession;
const CognitoUser = require('amazon-cognito-identity-js-node').CognitoUser;
const CognitoIdToken = require('amazon-cognito-identity-js-node').CognitoIdToken;
const CognitoAccessToken = require('amazon-cognito-identity-js-node').CognitoAccessToken;
const CognitoRefreshToken = require('amazon-cognito-identity-js-node').CognitoRefreshToken;
const cfg = require('config').config;
const COGNITO_IDENTITY_POOL_ID = cfg.COGNITO_IDENTITY_POOL_ID;
View setting-up-babel-nodemon.md

Setting up Babel and nodemon

Inital set-up

Set up project:

mkdir project
cd project
npm init -y
@zcmgyu
zcmgyu / build.gradle
Created May 7, 2018 — forked from rponte/build.gradle
Configuring Gradle compiler encoding
View build.gradle
apply plugin: 'java'
apply plugin: 'eclipse'
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
eclipseJdt << {
ant.propertyfile(file: ".settings/org.eclipse.core.resources.prefs") {
ant.entry(key: "eclipse.preferences.version", value: "1")
ant.entry(key: "encoding/<project>", value: "utf-8")
@zcmgyu
zcmgyu / CHANGELOG.md
Created Dec 28, 2017 — forked from dispix/CHANGELOG.md
OAUTH2 Authentication and token management with redux-saga
View CHANGELOG.md

Revision 5

  • Fix error parsing

Revision 4

  • Add missing yield in the login function

Revision 3

You can’t perform that action at this time.