개발자의 노트
article thumbnail
크론탭 시간 포맷 구하기

crobtab 시간 설정할 때 포맷이 맞는지 확인하고 싶을 경우가 많다. 또한, random 기능이 있어서 공부하기도 좋다. 이때 아주 유용한 사이트 https://crontab.guru/ crontab.guru - the cron schedule expression editor loading... Cron job failures can be disastrous! We created Cronitor because cron itself can't alert you if your jobs fail or never start. Cronitor is easy to integrate and provides you with instant alerts when things go wrong. Learn more abo..

[golang] go 언어 설치
소프트웨어개발/Go 2018. 11. 5. 16:43

CentOS 기준. yum 으로 설치해도 되고, 소스를 다운받아서 설치해도 된다. >>>> yum 으로 설치 # yum install golang 이 경우엔 go가 /usr/lib/golang 경로에 자동 설치되고, go 실행파일은 /usr/bin/go 가 된다. GOPATH를 잡아준다. GOPATH는 go로 작성된 소스들이 위치하는 작업 폴더라고 보면 된다. GOPATH 폴더엔 pkg와 src 폴더를 만들고, 우리가 작성하는 소스는 src 폴더에 위치하면 된다. # vi /etc/profile export GOPATH=/home/jobs/golang # source /etc/profile yum 으로 설치 끝 >>>> 혹은 아래처럼 소스 설치 # go version go version go1.10.2 ..

[Node.js] Node 6 설치 (CentOS)
소프트웨어개발/Node.js 2017. 10. 31. 15:34

git 설치 RHEL/CentOS 6 에는 git 1.7 이 포함되어 있는데. 이 버전이 https를 처리 못하는 버그가 있다고 한다. 따라서 git 버전을 확인해서 1.7이거나 아예 명령어를 인식하지 못한다면.. git 1.9 로 다시 설치하도록 하자. # git version git version 1.7.1 # git version -bash: git: command not found git 1.9 설치하기 # yum -y install curl-devel expat-devel gettext-devel openssl-devel zlib-devel cpio perl perl-ExtUtils-MakeMaker # cd /util/src # wget https://www.kernel.org/pub/soft..

[Delphi] 시스템 디폴트 언어 정보와 로케일 정보 얻기
소프트웨어개발/Delphi 2017. 10. 27. 17:01

시스템 디폴트 언어 ID - 한국어 : 1042 GetSystemDefaultLangID 시스템 기본 언어 - 한국어 : KOR function GetSystemDefaultLang: string; var szLang: array[0..5] of Char; begin Result := ''; GetLocaleInfo(GetSystemDefaultLCID, LOCALE_SABBREVLANGNAME, szLang, SizeOf(szLang) - 1); Result := szLang; end; 로케일 얻기 - 한국 : 한국어(대한민국) function CurrentLocale: string; var ID: LangID; LanguageName: array[0..254] of Char; begin {read c..

[Delphi] Bin -> Int / Hex -> Bin 변환
소프트웨어개발/Delphi 2017. 10. 27. 16:52

설명은 따로 없습니다. 아래 코드를 참고하세요. function BinToInt(const Bin: string): Integer; var I, Len: Integer; begin Result := 0; Len := Length(Bin); for i := Len downto 1 do if Bin[I] = '1' then Result := Result + (1 shl (Len - I)); end; function HexToBin(const Hexadecimal: string): string; const BCD: array[0..15] of string = ('0000', '0001', '0010', '0011', '0100', '0101', '0110', '0111', '1000', '1001', '101..

[Delphi] Int -> Hex / Hex -> Int 변환
소프트웨어개발/Delphi 2017. 10. 27. 16:49

설명은 따로 없습니다. 아래 코드를 참고하세요. const HexChars: array[0..15] of Char = ('0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f'); function IntToHex(Int: Int64; IntSize: Byte): string; var n: Byte; begin Result := ''; for n := 0 to IntSize - 1 do begin Result := HexChars[Int and $F] + Result; Int := Int shr $4; end; end; function HexToInt(const Value: string): LongWord; const He..

[Delphi] byte array -> string / string -> byte array 변환
소프트웨어개발/Delphi 2017. 10. 27. 16:45

특별한 설명은 없습니다. 아래 코드를 참고하세요. type TByteArr = array of byte; function ByteToString(const Value: TByteArr): String;var I: integer; S : String; Letra: char;begin S := ''; for I := Length(Value)-1 downto 0 do begin letra := Chr(Value[I] + 48); S := letra + S; end; Result := S;end; function StrToByte(const Value: String): TByteArr;var I: integer;begin SetLength(Result, Length(Value)); for I := 0 to Le..

MySQL 튜닝 툴 - MySQLTuner-perl

MySQL 서버의 상태를 모니터링하고 튜닝하기 위해 MySQLTuner-perl 라는 스트립트가 제공됩니다. 지원되는 환경은 아래와 같습니다. 윈도우는 아직 안되네요. https://github.com/major/MySQLTuner-perl 사이트에 방문하여 mysqltuner.pl 를 다운로드 받고 실행해주면 됩니다. # wget https://github.com/major/MySQLTuner-perl/blob/master/mysqltuner.pl # chmod +x mysqltuner.pl # perl mysqltuner.pl 아래 그림처럼 현재 MySQL 서버 상태를 체크해서 결과를 보여주게 됩니다. 결과에서 추천하는대로 서버를 튜닝해주세요. 자세한 내용은 https://github.com/majo..