Skip to content

Instantly share code, notes, and snippets.

View 9oelM's full-sized avatar
🎯
Focusing

Joel Mun 9oelM

🎯
Focusing
View GitHub Profile
@9oelM
9oelM / crawl_zigbang.py
Created March 12, 2019 04:15 — forked from giftbott/crawl_zigbang.py
직방 매물정보 크롤링, 학습용으로 사용
# -*- coding: utf8 -*-
"""
# 주요기능 : 직방 매물 정보 크롤링
# 상세기능 : 원하는 지역의 매물ID 를 가진 URL 을 입력받아 각 매물별 상세 정보를 csv 파일 및 jpg 파일로 저장
# 추가계획 : 현재 계획 없음
# 최종수정 : 2016.10.10
"""
import React, { useState } from 'react';
const Child1 = () => {
console.log('Child1 rendered')
return <div style = {{border: '1px solid red', padding: '30px'}}>
Child1
</div>
}
const Child2 = () => {
console.log('Child2 rendered')
import JSONfn from 'json-fn'
import isEqual from 'react-fast-compare'
export const areEqual = (prevProps, nextProps) => {
const [prev, next] = [prevProps, nextProps].map(JSONfn.stringify)
return isEqual(prev, next)
}
{"num":1,"sayHiInChildren":"_NuFrRa_child => console.log(\"hi~~~~~~~~~ - from \".concat(child))"}
@9oelM
9oelM / my-iterm-config.json
Created January 8, 2020 13:22
My iterm config (enables option/command + move or option/command + select and some more)
{
"Use Non-ASCII Font" : false,
"Tags" : [
],
"Ansi 12 Color" : {
"Red Component" : 0.51372549019607838,
"Color Space" : "sRGB",
"Blue Component" : 0.58823529411764708,
"Green Component" : 0.58039215686274515
@9oelM
9oelM / KitchenSink.stories.js
Created October 29, 2020 22:24 — forked from jeffcarbs/KitchenSink.stories.js
React Storybook - Kitchen Sink
// This is using Semantic-UI-React for a grid system but the rendering can be handled however you want.
import { getStorybook, storiesOf } from '@kadira/storybook'
import { Grid, Header } from 'semantic-ui-react'
// Avoid infinite loop
const KITCHEN_SINK_TITLE = 'Kitchen Sink'
const renderStory = (story) => (
<Grid.Row key={story.name} style={{ marginBottom: '1rem' }}>
@9oelM
9oelM / gist:440720a4efd6641faedea90e14565ca2
Created January 13, 2021 15:55 — forked from alisterlf/gist:3490957
JAVASCRIPT:Remove Accents
function RemoveAccents(strAccents) {
var strAccents = strAccents.split('');
var strAccentsOut = new Array();
var strAccentsLen = strAccents.length;
var accents = 'ÀÁÂÃÄÅàáâãäåÒÓÔÕÕÖØòóôõöøÈÉÊËèéêëðÇçÐÌÍÎÏìíîïÙÚÛÜùúûüÑñŠšŸÿýŽž';
var accentsOut = "AAAAAAaaaaaaOOOOOOOooooooEEEEeeeeeCcDIIIIiiiiUUUUuuuuNnSsYyyZz";
for (var y = 0; y < strAccentsLen; y++) {
if (accents.indexOf(strAccents[y]) != -1) {
strAccentsOut[y] = accentsOut.substr(accents.indexOf(strAccents[y]), 1);
} else
@9oelM
9oelM / circleci-2.0-eb-deployment.md
Created January 20, 2021 15:20 — forked from ryansimms/circleci-2.0-eb-deployment.md
Deploying to Elastic Beanstalk via CircleCi 2.0

Deploying to Elastic Beanstalk via CircleCi 2.0

I got to here after spending hours trying to deploy to an Elastic Beanstalk instance via CircleCi 2.0 so I thought I'd write up what worked for me to hopefully help others. Shout out to RobertoSchneiders who's steps for getting it to work with CircleCi 1.0 were my starting point.

For the record, I'm not the most server-savvy of developers so there may be a better way of doing this.

Setup a user on AWS IAM to use for deployments

@9oelM
9oelM / deploy_with_ebcli3_on_circleci.md
Created January 20, 2021 15:24 — forked from RobertoSchneiders/deploy_with_ebcli3_on_circleci.md
Settings to deploy to AWS Elastic Beanstalk on CircleCi (EB Cli 3)

This is how I configured the deploy of my rails apps to AWS Elastic Beanstalk through CircleCI 1.0.

If you are using the Circle CI 2.0, take a look at this article from ryansimms

Configure Environments Variables

On Project Settings > Environment Variables add this keys:

  • AWS_ACCESS_KEY_ID
  • AWS_SECRET_ACCESS_KEY
    The aws user must have the right permissions. This can be hard, maybe, this can help you.
@9oelM
9oelM / tcSync.ts
Last active March 9, 2021 13:50
Try catch sync wrapper
export function tcSync<Fn extends (...args: any) => any, Deps extends Parameters<Fn> = Parameters<Fn>>(fn: Fn, deps: Deps): TcResult<ReturnType<Fn>> {
try {
const data: ReturnType<Fn> = fn(...deps);
return [null, data];
} catch (e) {
return [e] as [Error]
}
}