GithubHelp home page GithubHelp logo

jsdevkr / gitcodeshare.com Goto Github PK

View Code? Open in Web Editor NEW
76.0 76.0 22.0 3.18 MB

Contributhon 2018 - gitCodeShare.com (a.k.a gitShare)

Home Page: https://gitcodeshare.com

License: MIT License

JavaScript 6.40% TypeScript 70.15% CSS 22.49% Dockerfile 0.96%

gitcodeshare.com's People

Contributors

aeei avatar andrew-chequer avatar currybob avatar gimdongwoo avatar ho1234c avatar ianychoi avatar jayjongcheolpark avatar jinic avatar martinyounghoonkim avatar rayleighko avatar songyiyu avatar thomasjang avatar uhh77 avatar umanking avatar woo-gim avatar ysm-dev avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

gitcodeshare.com's Issues

8/23 [Chrome Extension] Team meeting - online(Zoom.us)

Chrome Extension

  • Shared experience creating 'Chrome Extension' basic tutorials.(Myungjin)
  • Explained the contents of the manifest.json file.(Chris)
  • Explained the structure of the background.js.(Chris)
  • Shared experience creating facebook pages modification example use 'Chrome Extension'.(Chris)

Typescript

  • Explained the difference between Android and Typescript.(songi)
  • keyword 'generic' in Typescript.(songi)

React

  • Explained what should pay attention to when using React.(Jongho)
  • Explained the difference between MobX and Redux.(Jongho)

Etc.

  • We wonder why use MobX, mobx state tree?'(all)
  • We finally discussed to the features we will develop. but, we decided to proceed after the next offline meeting to details.(all)

What I studied today

  • create, update, delete Gist API

There is an issue when HTTP method is POST passport doesn't call serialize & deserialize (req.user is undefined).
I googled, but I didn't find a solution yet.

Here is my code

server.use(cookieParser(process.env.COOKIE_SECRET));
    server.use(bodyParser.json());
    server.use(bodyParser.urlencoded({ extended: false }));
    server.use(
      session({
        genid: function() {
          return uuid();
        },
        store: new RedisStore({
          client: client,
          logErrors: true,
        }),
        secret: process.env.SESSION_SECRET,
        saveUninitialized: false,
        resave: false,
        cookie: {
          signed: true,
          maxAge: 1000 * 60 * 60 * 4,
          httpOnly: true,
        },
      }),
    );
const postGist = (req: Request, res: Response, next: NextFunction) => {
  request.post(
    `https://api.github.com/gists`,
    {
      json: true,
      body: JSON.stringify(req.body),
      headers: {
        Authorization: `token ${req.user.accessToken}`, // TypeError: Cannot read property 'accessToken' of undefined
        'Content-Type': 'application/json; charset=utf-8',
        'User-Agent': `${name}/${version}`,
      },
      withCredentials: true,
    },
    (err, response, body) => {
      if (err) {
        return next(err);
      }
      res.send(body);
    },
  );
};

TIL

Today I Learned

  • bought a new laptop (windows => mac)
  • set new development environment
  • learned about UNIX

Next planned

  • frontend team meeting

What I studied today

screen shot 2018-08-23 at 1 02 07 am

I read typescript handbook especially module part!!!!!!
because I want to know about this !

What I studied today

• Learning the express module in Node.js
• Using Orientdb to build a web application

What I studied today

today

  • Analyze project structure for add gist API
  • Add gistHandler in the forked repo (gist API)
  • Study passport

tomorrow

  • Study passport
  • Add Github OAuth using passport

TIL

next js has lower barrier to entry than I thought. though I don't know well about SSR, it was not hard to understand. It was interesting that the structure was forced unlike create react app. If you haven't already seen it, I hope you'll take a look. our project is almost like nextjs-express-startkit.

[study] What i studied today

Originally planned

React
  • state update, delete
  • view examples of ajax http request
Typescript
  • interface

    - interface basic
    - duck typing
    - interface optional props => ? behind interface props
    
  • generic

    - prevent runtime type error
    - And make type extend scalable at the same time
    
class Parent {
  data:any[];
  
  constructor(){
  	this.data = [];    
  }
  
  push(item) {
  	this.data.push(item);
  }
}

const p = new Parent();
p.push(1);
p.push('1');

p.data = p.data.map(v => v.toFixed()); // type error    

// extend Number type
class Child extends Parent {
  push(item: number) {
    super.push(item);
  }
}

const c = new Child();
c.push(1);
c.push('1');

c.data = c.data.map(v => v.toFixed()); // clean

// but at various type ?
// use generic

class Parent<T> {
  protected data: Array<T> = [];

  push(item) {
    this.data.push(item);
  }
}

const numArr = new Parent<number>();
numArr.push(1);
numArr.push('1') // compile error

const objArr = new Parent<{num: number, str: string}>();
objArr.push({num: '1', str: 1}) // compile error
To study more
  • do stop just take notes, and move to code
  • more on typescript
  • javascript polymorphism

how about connect travis ci, commit lint ours project ?

suggest below two lib for more convenient and systematic ours opensource project gitCodeShare!

easliy sync ours github project and test code in convenient.
for example build error, lint error etc... 
commitlint is Lint commit messages.  if use this lib then commit message display According to purpose
for example test: blah blah, ci: blah blah, docs: blah blah 

[Question] How to store access token?

[Question] How to store access token?

  1. To call gist API, I need access token.
  2. Access Token should not be exposed.
  • But We don't have database.

So, I thought...

  1. Get access token every time to call gist API
  • I think this is very ineffective
  1. Store in cookie with it signed
  • googled with this issue, there is another option that sessionStorage. But client side store is very unsafe
  1. Use passport session
  • but I'm not sure how safe it is.
  1. Use database...

Which way is the best? or something else?

cc. @gimdongwoo , @thomasJang , @umanking , @Parkkkkk

TIL

  • read typescript handbook!

What I Studied today

I'v tried to apply mobx in react todo application project, but jsx is not familiar to me.
So I expect it'll take a lot of time.
Maybe I think I can try to appling typescript in Mobx + react application in next week.

Bug about node-gyp when I "npm install"

If use pyenv and don't select any python, you facing this error even though you installed python in the system. I think it is to be a related with node-gyp.

gyp ERR! configure error 
gyp ERR! stack Error: Command failed: /Users/jonghojeong/.pyenv/shims/python2 -c import sys; print "%s.%s.%s" % sys.version_info[:3];
gyp ERR! stack pyenv: python2: command not found
gyp ERR! stack 
gyp ERR! stack The `python2' command exists in these Python versions:
gyp ERR! stack   2.7.6
gyp ERR! stack   2.7.6/envs/test
gyp ERR! stack   2.7.8
gyp ERR! stack   2.7.8/envs/dietnote_server
gyp ERR! stack   dietnote_server
gyp ERR! stack   test
gyp ERR! stack 
gyp ERR! stack 
gyp ERR! stack     at ChildProcess.exithandler (child_process.js:275:12)
gyp ERR! stack     at emitTwo (events.js:126:13)
gyp ERR! stack     at ChildProcess.emit (events.js:214:7)
gyp ERR! stack     at maybeClose (internal/child_process.js:925:16)
gyp ERR! stack     at Socket.stream.socket.on (internal/child_process.js:346:11)
gyp ERR! stack     at emitOne (events.js:116:13)
gyp ERR! stack     at Socket.emit (events.js:211:7)
gyp ERR! stack     at Pipe._handle.close [as _onclose] (net.js:567:12)
gyp ERR! System Darwin 17.7.0
gyp ERR! command "/usr/local/bin/node" "/Users/jonghojeong/source/gitCodeShare.com/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
gyp ERR! cwd /Users/jonghojeong/source/gitCodeShare.com/node_modules/node-sass
gyp ERR! node -v v8.10.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok 

I solved this problem through select python version in pyenv like this.

pyenv shell "PYTHON VERSION YOU WANT"

What I Studied today

• Connecting servers with typescript [50%]
• Read the gist API
• typescript grammar study

What I studied today

learn to chrome extension

Read follow this:

Getting Started Tutorial to chrome extension

and write example chrome-extension follow this:

  1. write to html code for base(hello.html).
  2. Add basically icon.
  3. write manifest.json like this:
{
    "author": "rayleigh",
    "manifest_version": 2,
    "locale": "en ",
    "name": "extension tutorial",
    "short_name": "ex tuto",
    "description": "extension tutorial for gitcodeshare",
    "version": "0.0.1",
    "version_name": "preview",
    "browser_action": {
        "default_icon": "hello extension.png",
        "default_popup": "hello.html"
    },
    "icons": {
        "128": "hello extension.png"
    },
    "permissions": [
        "activeTab", "http://*/*", "https://*/*"
    ]
}
  1. move 'chrome://extensions ' in chrome address bar.
  2. check 'developer mode'.
  3. open Directory with files to Click 'Load unpacked'(All files should be in one place. - Really?).

I can't proceed because we need to register as a developer at chrome extension.
So we need a developer registration to chrome extension.

today's learning time: 1hr
total learning time: 2hr

Secret key management

If there is a key should not be exposed, how can I management and shared with developers?

If I registered key into .gitignore file, I cannot share the key with developers.
In the opposite case, the key can be exposed.

How should I do?

8/26 [Backend] Team Meeting - offline

kakaotalk_photo_2018-08-26-15-08-23

This week

  • stuck in the passport.js
  • [problem] passport doesn’t verify callback function never called
  • [problem] Also, serialize/deserialize is not working

Next week

  • study puppeteer

What I studied today

  • Setting passport by GithubStrategy (handlers/passport.ts)
  • Implement login/logout with redis #51
  • Solved call passport.deserializeUser function many times
server.use(function(req, res, next) {
      if (req.url.match('/_next/*') || req.url.match('/static/*')) {
        next();
      } else {
        passport.session()(req, res, next);
      }
    });
  • gist API (handlers/gist.ts)
    • get all/single list,
    • create/update/delete

8/19 [Backend] team study

kakaotalk_photo_2018-08-19-16-34-37
kakaotalk_photo_2018-08-19-16-34-42

This Week

Next Week

  • Analyze puppeteer, carbon
  • Develop Gist API

Gist API Design

Method Routes Description
GET /gists List of gists
GET /gists/:gist_id Get single gists
FETCH /gists/:gist_id Edit gists
POST /gists Create gists

Request

Create OAuth app, we need to get client_id client_secret
cc. @gimdongwoo @thomasJang

8/24 [Frontend] Offline meeting

Front end Team Meeting

kakaotalk_photo_2018-08-24-21-22-24

Today we did

  • Analyzed project default structure
  • Studied about AntDesign
  • Defined component and pages we need
    1. Conpoment
      • Use antdesign default(Layout, Header, Footer, Menus, Card, Modal ...etc)
      • Contributor thumbnail
      • Code editor
      • Login modal (page ? or modal)
    2. Page
      • index
      • contributors
      • feature
      • code view page

Planning to next offline meeting

Question

  1. We need clear standard about stylsheet file division. For example, We are considering that make each stylesheet file for each component or define style by styled-component in component > [component].js file. which is right? is there more efficient way or any standard? Could we define our own standard?
  2. Please confirm for components and pages we divided. @thomasJang @gimdongwoo

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.