본문 바로가기 메뉴 바로가기

민호.닷컴

프로필사진
  • 글쓰기
  • 관리
  • 태그
  • 방명록
  • RSS

민호.닷컴

검색하기 폼
  • 분류 전체보기 (105)
    • 소소한일상 (7)
    • 관심폭발 (5)
    • 공부합시다 (47)
      • ionic (2)
      • php (16)
      • express (2)
      • python (5)
      • Golang (4)
    • 비밀이여 (0)
    • 갑자기 문뜩 (5)
    • What did u do today (0)
  • 방명록

분류 전체보기 (105)
Redis pub/sub in golang

go get github.com/go-redis/redis/v8 package main import ( "context" "fmt" "github.com/go-redis/redis/v8" ) func main() { // Redis 연결 rdb := redis.NewClient(&redis.Options{ Addr: "{host}", Password: "{password}", DB: "{dababase}", }) ctx := context.Background() pubsub := rdb.Subscribe(ctx, "mychannel") defer pubsub.Close() // 고루틴으로 수신된 메시지를 처리 go func() { for { msg, err := pubsub.ReceiveMessage(c..

공부합시다/Golang 2023. 5. 4. 08:59
GVM으로 go설치하기

nodejs의 NVM과 같이 golang에도 GVM을 통해 버전관리가 가능하다. gvm: https://github.com/moovweb/gvm GVM 설치하기 // zsh $ zsh <

공부합시다/Golang 2023. 3. 30. 13:27
golang 웹크롤링 예제

package main import ( "fmt" "io/ioutil" "net/http" ) func main() { // 크롤링할 URL 리스트 urls := []string{ "https://www.example.com", "https://www.example.com/page1", "https://www.example.com/page2", } // 응답 본문을 받을 채널 respChan := make(chan string) // URL 리스트를 순회하며 각 URL을 처리하는 고루틴을 생성합니다. for _, url := range urls { go func(url string) { respBody, err := httpGet(url) if err != nil { fmt.Printf("Error ge..

공부합시다/Golang 2023. 3. 15. 09:19
git merged branch 삭제하기

remote에서 머지된 브랜치 일괄 삭제하기 // master, feature 브랜치 제외 머지된 브랜치 삭제하기 git branch --merged | grep -v '\*' | grep -v master | grep -v feature | xargs -n 1 -r git branch -d 참고: https://digitaldrummerj.me/git-remove-local-merged-branches/ Git - Remove Local Branches That Are Merged or No Longer Exist After a while your list of local git branches can get a bit out of control especially if you doing all of ..

공부합시다 2022. 4. 18. 09:27
Golang으로 Todo 만들기

새로운 프로젝트 시작하면서 새로운 언어와 프레임워크를 도입하게 되었다. 간단하게 Golang을 배우면서 Todo 앱을 만들어보기로 한다. Golang ORM은 대부분 gorm을 많이 사용하나, 공식적으로 지원하는 DB가 적다. 최근까지 활발하게 업데이트도 되고 github 별점도 높으나 공식적으로 지원하는 DB가 한정적이라 일단 그다음으로 많은 xorm으로 적용해 보았다. 특별히 gorm과 많이 다르지 않아서 별 차이없는 없는 듯. 다만 22년 1월 현재기준. 20년 업데이트가 마지막이라 그 부분에서는 염려가 된다. go get github.com/go-sql-driver/mysql go get github.com/gin-gonic/gin go get xorm.io/xorm go-gin & xorm To..

공부합시다/Golang 2022. 1. 21. 14:49
정규식을 배워보자

정규식을 조금 더 쉽게 배울 수 있는 사이트 스탭별로 진행하다보면 정규식을 쉽게 습득할 수 있을 듯 하다. https://regexlearn.com Regex Learn - Step by step, from zero to advanced. Learn Regular Expressions, abbreviated as RegEx or RegExp, are a string of characters created within the framework of RegEx syntax rules. You can easily manage your data with RegEx, which uses commands like finding, matching, and editing. Regex can be used regexle..

카테고리 없음 2021. 12. 16. 09:02
Graphql-php + CI3 Date타입 추가하기.

기본적으로 사용할 수 있는 Scalar 타입은 정해져있다. //http://webonyx.github.io/graphql-php/type-definitions/scalars/ use GraphQL\Type\Definition\Type; // Built-in Scalar types: Type::string(); // String type Type::int(); // Int type Type::float(); // Float type Type::boolean(); // Boolean type Type::id(); // ID type 그 외에 필요한 타입은 커스텀하여 사용하여야하는데, 대표적으로 Date, DateTime 타입이 없는지 아쉬운 부분이다. 그래도 친절하게 필요한 타입을 정의하여 사용할 수 있도록..

카테고리 없음 2021. 8. 13. 09:34
JS Array 중복 제거하는 방법 ES6

Array 중복제거하는 방법 보통 filter를 주로 사용하였으나 다른 방법이 있는지 찾아보았다. # Filter const array = [&#39;a&#39; , 1, 2, &#39;a&#39; , &#39;a&#39;, 3]; array.filter((item, index) => array.indexOf(item) === index); # Set const array = [&#39;a&#39; , 1, 2, &#39;a&#39; , &#39;a&#39;, 3]; [...new Set(array)]; //or Array.from(new Set(array)); # Reduce const array = [&#39;a&#39; , 1, 2, &#39;a&#39; , &#39;a&#39;, 3]; array..

공부합시다 2021. 8. 5. 11:30
이전 1 2 3 4 5 6 ··· 14 다음
이전 다음
공지사항
  • 오예 도메인 주소 변경
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
링크
  • 코드스쿨
  • 코드전쟁!@
  • 변수명짓기
  • PHP-GRAPHQL
  • 해커랭크
  • excaildraw
TAG
  • 정규식
  • addMonthWithoutOverflow
  • 메일
  • 자바스크립트
  • laravel-kafka
  • msmtp
  • MySQL
  • password-manager
  • graphql
  • addMonth
  • bitwarden-cli
  • POP3
  • Python
  • laravel-test
  • django
  • 정의
  • vim
  • exception-test
  • l5-swagger
  • l5-swagger-response
  • 라라벨
  • aaa패턴
  • graphql-php
  • observer 매개변수 전달하기
  • redis
  • 테스트_다중트랜잭션
  • 컨테이너내에서 메일 발송하기
  • php
  • Laravel
  • eloquent-observer
more
«   2025/05   »
일 월 화 수 목 금 토
1 2 3
4 5 6 7 8 9 10
11 12 13 14 15 16 17
18 19 20 21 22 23 24
25 26 27 28 29 30 31
글 보관함

Blog is powered by Tistory / Designed by Tistory

티스토리툴바