전체
-
[css] 이미지 에러 처리하기, 디폴트 이미지 처리Dev/TIL 2022. 8. 27. 02:38
이미지 에러 처리를 간단하게 하는 방법 background image 백그라운드 이미지를 사용하는 경우 url을 여러번 넣어서 fallback을 처리할 수 있다. background-image: url('적용할 이미지 주소'), url('fallback으로 적용할 이미지 주소'); 배경이 투명이면 그대로 뒤에 비쳐지게 된다. 이럴때는 background image 보다는 img로 마크업하자. const handleError = (e) => { e.target.src = '적용할 이미지 주소' }
-
요즘 하는 운동Daily 2022. 4. 20. 23:40
초등학생부터 중학생까지 청소년 선수단에서 수영을 했었다. 처음에는 부모님이 시켜서 시작하게 된 거지만 선수단에서 대회 준비를 하며 심폐지구력 단기 순발력 그 외 스킬등을 익히며 승부욕을 자극하는 과정들이 지금 생각해보면 꽤 재밌는 추억 같긴 하다. 이런저런 대회에 나가서 상도 많이 탔었다. 어느 순간 부터 금메달을 따기가 힘들었고 나보다 훨씬 잘하는 친구들을 만날 때면 한참 기가 죽었었다. 내 꿈이 수영선수는 아니었고 그 당시 공부를 더 하고 싶어서 선수단 생활을 그만 뒀었다. 성인이 되고 나서는 제대로 수영을 한 적이 손에 꼽을 정도로 적다. 내가 할 수 있는 운동을 찾다가 집 근처 수영 강습을 끊으면 몇 회 가다가 힘들어서 안 간 경우가 허다하다. 조금만 힘들면 예전에 힘들게 선수단 생활을 했던 생각..
-
<br /> 태그를 엔터로 바꾸는 방법Dev/TIL 2022. 4. 20. 00:28
const = '안녕하세요 반갑습니다 저를 엔터로 바꿔주세요' 위와 같은 데이터를 엔터로 바꾸는 가장 쉬운 방법 1. CSS 사용 white-space: pre-wrap 을 사용한다. 2. 스크립트 사용 {data.split("\n").map((line) => { return ( {line} ); })} 3. React를 사용할 경우 dangerouslySetInnerHTML 사용 ... https://reactjs.org/docs/dom-elements.html#dangerouslysetinnerhtml
-
localhost 에서 ssl 설정하기, 호스트(host) 변경하기Dev/TIL 2022. 4. 14. 15:56
개발을 하다보면 localhost에서 ssl 접근이 필요한 경우가 있다. 이때 호스트 변경과 local ssl proxy를 사용하면 된다. localhost host 설정 변경 $ vi /etc/hosts 편집모드를 키고 127.0.0.1 localhost 부분을 원하는 도메인으로 추가해준다. 나는 임시로 test.com 으로 설정했다. 로컬에서 local ssl proxy 설정 $ npx local-ssl-proxy --source 443 --target 3035 target에는 현재 열려있는 포트 번호를 넣어준다. https://www.npmjs.com/package/local-ssl-proxy local-ssl-proxy Simple SSL HTTP proxy using a self-signed c..
-
신입시절 깨달은 것들Daily 2022. 4. 7. 00:00
대학생 시절 컴퓨터공학과에서 꽤 재밌게 전공들을 들었던 것 같다. 이론수업만 듣기에는 조금 부족해서 관련 동아리나 대외활동 등 나의 미래 직업에 도움이 될만 한 일들을 이것 저것 했다. 그러다 대학교 4학년 어느 방학. 같이 붙어다니는 동기 언니가 갑자기 조기취업을 했다며 다음 학기부터는 취업계를 쓰고 학교에 나오지 않는다고 했다. 무언가 멋있고 재밌어보여서 멋도 모르고 당시 취업 관련 사이트에 들어가 신입을 뽑는, 일하면 재밌을 것 같은 회사들에 무작정 지원을 했다. 이력서는 이전에 인턴이나 대외활동때 미리 적어 둔 것이 있어서 그걸 제출했다. 그러다 운 좋게 내가 일해보고 싶은 웹 기반 서비스를 하고 있는 스타트업에 합격했다. 회사의 서비스가 좋았고, 회사의 일하는 분위기가 좋아보였고, 회사에서 같이..
-
서울에서의 자취 :: 강남 주민 4년차Daily 2022. 3. 23. 23:30
벌써 독립한 지 4년 차가 다되어 간다. 지금은 두 번째 집에서 살고 있다. 경기도 용인에서 쭉 살았었고, 학교도 경기도 였어서 스무 살 중반까지만 해도 서울은 나에게 복잡하고 어디가 어딘지 모르겠는 어려운 곳이었다. 파란색 버스는 가운데서 타야 하고 방향도 매번 잘못 봐서 서울에서 약속이 있는 날이면 지각하기 일쑤였다. 물론 지금도 서울을 다 모르지만. '걸어서 출퇴근을 하고 싶다'가 자취를 시작하게 된 계기 중 하나다. 심플하게는 회사와 가까운 곳을 찾다 보니 강남역 근처로 알아보게 되었다. 다른 곳은 알아보지도 않았다. 당연히 다른 곳보다 땅값도 비싸고 물가도 비싸다는 생각에 내 예산 내에서 아주 좋은 집은 구하지 못할 것이라는 것은 알고 있었다. 그래도 첫 자취를 회사 근처에서, 그것도 강남에서 ..
-
마스크 없이 가고 싶은 자연경관 명소들Daily 2022. 3. 9. 23:52
사회에서 새로운 사람을 만나게 되면 많이 주고받는 질문이 하나 있다. "취미나 좋아하는 것 있나요?" '여행하는 걸 좋아해요.' 거의 대부분의 답변에는 여행이 들어가 있다. 근데 나는 여행을 좋아하지 않았던 편이라 한 번도 여행이라고 대답해 본 적도 없고, 여행이 좋다는 사람들이 신기하기도 했다. 주변 환경의 익숙함을 좋아했고, 새로운 곳에 가면 먹는 거 씻는 거 자는 거 모두 달라지기 때문에 오랜 기간 동안 밖에 나가 있는 것 자체를 좋아하지 않았다. 국내에 한해 당일치기로 혹은 1박 2일로 짧게 다녀오는 것 외에는 어딜 많이 돌아다니지 않은 것 같다. 비행기를 타고 다녀온 해외 여행지로 보면 어릴 때 다녀온 오스트레일리아, 대학생 때 어학연수로 잠시 다녀온 도쿄, 맛있는 거 먹고 놀다 오기 위해 다녀..
-
관계의 교집합이 아닌 여집합Daily 2022. 2. 23. 23:18
학창 시절엔 한 공간에 오래 머물며 같은 경험 하며 그때의 방식으로 우정을 쌓아갔다. '그땐 그랬지' 하며 추억을 공유할 수 있는 친구들. 성인이 되고 나서는 다양한 장소에서 더 다양한 사람들을 만나고 조금이나마 나와의 교집합이 있는 사람들을 만날 수 있었다. 대학생 때 대외활동도 많이 하고 회사생활도 일찍부터 시작했던 나는 나이, 직업, 가치관이 다양한 사람들과 친해지고 이야기하며 때로는 먼저 경험했던 일적인 부분과 삶의 지혜들도 간접적으로 배우고, 내 생각의 범위를 더 넓히고, 같이 다니며 많은 것들을 배울 수 있었다. 이렇게 가까워진 관계들이 내가 원하든 원치 않든 멀어질 수도 있기야 하겠다. 하지만 요즘 들어 왜 상대방 쪽에서 멀어지기만 하는 걸까 하는 생각이 자주 들곤 한다. 내가 소중하게 생각..