Skip to content

Instantly share code, notes, and snippets.

View geoseong's full-sized avatar
🏠
Working from home

TaeSeong Park geoseong

🏠
Working from home
View GitHub Profile
using UnityEngine;
using UnityEngine.UI;
using UnityEngine.SocialPlatforms;
using GooglePlayGames;
using GooglePlayGames.BasicApi;
public class GPGSManager : MonoBehaviour
{
[SerializeField]
Text txtSigninStatus;
@geoseong
geoseong / relay-pagination.graphql
Last active March 14, 2020 07:21
Relay's Cursor Connections Specification
{
user {
id
name
friendsConnection( # <- Connection Type
first: 2 # <- non-negative integer
after: "Y3Vyc29yMQ==" # <- cursor type
) {
edges { # <- Connection Types's fields. (type: LIST)
node { # <- Edge Type's fields. (type: OBJECT -> Scalar, Enum, Object, Interface, Union, or a Non‐Null)
@geoseong
geoseong / add-to-group.js
Last active March 15, 2020 15:19
The way to signup with KAKAO social provider using Amazon Cognito and AWS Amplify: step 05(Post Confirmation Cognito Lambda Trigger)
// amplify/backend/function/{amplify's auth Resource name}PostConfirmation/src/add-to-group.js
/* eslint-disable-line */ const aws = require('aws-sdk');
exports.handler = async (event, context, callback) => {
const cognitoidentityserviceprovider = new aws.CognitoIdentityServiceProvider({ apiVersion: '2016-04-18' });
const GroupName = event.request.clientMetadata.GroupName;
const addUserParams = {
GroupName,
UserPoolId: event.userPoolId,
Username: event.userName,
@geoseong
geoseong / custom.js
Created February 19, 2020 17:58
The way to signup with KAKAO social provider using Amazon Cognito and AWS Amplify: step 04(Pre sign-up Cognito Lambda Trigger)
// amplify/backend/function/{amplify's auth Resource name}PreSignup/src/custom.js
exports.handler = async (event, context, callback) => {
console.log('pre signup event', JSON.stringify(event, null, 2))
event.response.autoConfirmUser = true;
event.response.autoVerifyEmail = true;
callback(null, event);
};
@geoseong
geoseong / kakaologin-cloudformation-template.json
Last active February 19, 2020 17:35
The way to signup with KAKAO social provider using Amazon Cognito and AWS Amplify: step 03(REST API's IAM Role)
// amplify/backend/function/kakaologin/kakaologin-cloudformation-template.json
{
"AWSTemplateFormatVersion": "2010-09-09",
"Description": "Lambda resource stack creation using Amplify CLI",
...
"Resources": {
"lambdaexecutionpolicy": {
"DependsOn": [
"LambdaExecutionRole"
],
@geoseong
geoseong / app.js
Last active February 20, 2020 02:13
The way to signup with KAKAO social provider using Amazon Cognito and AWS Amplify: step 02(REST API)
// REST API: amplify/backend/function/kakaologin/src/app.js
var express = require('express');
var bodyParser = require('body-parser');
var awsServerlessExpressMiddleware = require('aws-serverless-express/middleware');
const axios = require('axios');
const AWS = require('aws-sdk');
const cognitoidentityserviceprovider = new AWS.CognitoIdentityServiceProvider({
apiVersion: '2016-04-18',
region: 'ap-northeast-2',
});
@geoseong
geoseong / index.html
Last active February 19, 2020 17:32
The way to signup with KAKAO social provider using Amazon Cognito and AWS Amplify: step 01(kakao sdk import in create-react-app)
<!-- public/index.html -->
<script src="//developers.kakao.com/sdk/js/kakao.min.js"></script>
@geoseong
geoseong / App.js
Last active May 19, 2020 11:22
The way to signup with KAKAO social provider using Amazon Cognito and AWS Amplify: step 01
// src/App.js
// 카카오 SDK initialize하기
import React, { useEffect } from 'react';
function App() {
useEffect(() => {
if (window.Kakao) {
const kakaoJSKey = '/* kakaoJSKey */';
window.Kakao.init(kakaoJSKey);
console.log('kakao sdk initialized!!');
} else {
@geoseong
geoseong / collectMeetupAttendees.js
Last active March 10, 2023 04:08
meetup.com attendees crawling scripts in browser devtools
/**
* @name meetup_attendee_crawling_scripts_in_browser
* @author geoseong (parkopp@gmail.com)
* @description
* 1. turn on chrome
* 2. go to meetup's attendees page
* 3. turn on chrome devtools
* 4. paste this script and enter
*/
var attendlistSelector = `div.chunk`;
@geoseong
geoseong / Page.tsx
Last active November 24, 2019 07:26
how to access extra key in app.json
import Constants from 'expo-constants';
// all the imports of react-native
function Screen(props: Props): React.ReactElement {
// definitions
console.log('----extra value', Constants.manifest.extra);
// return <>...</>
}