Skip to content

Instantly share code, notes, and snippets.

View sagnol's full-sized avatar

Sagnol sagnol

  • Seoul, Korea
  • 20:27 (UTC +09:00)
View GitHub Profile
@anchan828
anchan828 / README.md
Last active January 28, 2025 22:35
This is an improvement to allow @nestjs/[email protected] to handle CustomRepository. I won't explain it specifically, but it will help in some way. https://github.com/nestjs/typeorm/pull/1233

You need to provide some classes and decorators yourself to maintain the same style as [email protected].

1. EntityRepository -> CustomRepository

@EntityRepository(UserEntity)
export class UserRepository extends Repository<UserEntity> {}

@aelbore
aelbore / typescript-web-components.md
Last active June 23, 2024 01:17
Step by Step creating web components in typescript using rollup

Getting Started

  • Install Dependencies
    npm init
    npm install --save-dev ts-node typescript tslib express @types/express
    

Create your web server

  • Create server.ts in root folder of your app.
@miguelmota
miguelmota / ssm_parameter.go
Last active September 26, 2023 10:36
AWS SSM Go SDK parameter store example
package main
import (
"fmt"
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/session"
"github.com/aws/aws-sdk-go/service/ssm"
)
@nikhita
nikhita / update-golang.md
Last active February 24, 2025 03:12
How to update the Go version

How to update the Go version

System: Debian/Ubuntu/Fedora. Might work for others as well.

1. Uninstall the exisiting version

As mentioned here, to update a go version you will first need to uninstall the original version.

To uninstall, delete the /usr/local/go directory by:

@sigmadream
sigmadream / install_qt5_for_brew.md
Last active March 26, 2022 06:18
OSX에서 qt5를 설치하는 간단하고 아름다운 방법에 관하여..

OSX에서 'brew'와 함께하는 qt5 설치

0. 인터넷에 연결

  • 수단과 방법을 가리지 말고 네트워크에 연결하여, 인터넷이 가능하도록 환경을 구성한다.

1. Xcode 최신버전

  • 'App Store'에 가셔서 Xcode 최신버전을 설치합니다. 단순하게 설치만 하시면 됩니다.

2. brew 설치하기

  • 'Launchpad' - '기타' - '터미널'을 실행한다.
@sergiotapia
sergiotapia / md5-example.go
Last active December 5, 2023 03:53
Golang - How to hash a string using MD5.
import (
"crypto/md5"
"encoding/hex"
)
func GetMD5Hash(text string) string {
hasher := md5.New()
hasher.Write([]byte(text))
return hex.EncodeToString(hasher.Sum(nil))
}
@michail-nikolaev
michail-nikolaev / gist:3840973
Created October 5, 2012 16:55
JPA - Tree structure with automatic order and tested operations for it
@Entity
public class TreeCategory extends IdentifiableEntity {
....
@ManyToOne(optional = true)
@JoinColumn(name = "parent_id", referencedColumnName = "id")
public TreeCategory getParent() {
return parent;
}
@pkese
pkese / gist:2790749
Created May 25, 2012 21:36
Django&PostgreSQL: LISTEN + NOTIFY = Async notifications
##########################################################
# django postgres polling - LISTEN
import psycopg2.extensions
import select
from django.db import connection
crs = connection.cursor() # get the cursor and establish the connection.connection
pg_con = connection.connection
@spikebike
spikebike / client.go
Created March 29, 2012 01:13
TLS server and client
package main
import (
"crypto/tls"
"crypto/x509"
"fmt"
"io"
"log"
)