콘솔에서


p4 set P4IGNORE=.p4ignore (set)



적용하고 싶은 폴더에


bin/*

obj/*


.vs/*

.vscode/*

packages/*

x64/* 


아래 내용을 넣고 .p4ignore 파일 생성



windows 에서 파일 이름이 안바뀌면


콘솔에서 


rename "새 파일.txt" .p4ignore

'Develop' 카테고리의 다른 글

c# interface method 정의  (0) 2018.12.04
WPF Binding  (0) 2018.11.12
python AES 암호화  (0) 2018.05.17
nodejs zip  (0) 2018.02.27
mac 에서 logcat  (0) 2018.02.22
class AESCipher:

    BLOCK_SIZE = 16

    class PKCS7Encoder():
        class InvalidBlockSizeError(Exception):
            """Raised for invalid block sizes"""
            pass

        def __init__(self, block_size=16):
            if block_size < 2 or block_size > 255:
                raise AESCipher.PKCS7Encoder.InvalidBlockSizeError('The block size must be ' \
                        'between 2 and 255, inclusive')
            self.block_size = block_size

        def encode(self, text):
            text_length = len(text)
            amount_to_pad = self.block_size - (text_length % self.block_size)
            if amount_to_pad == 0:
                amount_to_pad = self.block_size
            pad = chr(amount_to_pad)
            return text + pad * amount_to_pad

        def decode(self, text):
            pad = text[-1]
            return text[:-pad]

    def __init__(self, key, iv):
        self.key = key
        self.iv = iv
        self.encoder = AESCipher.PKCS7Encoder(AESCipher.BLOCK_SIZE)

    def encrypt(self, raw):
        data = self.encoder.encode(raw)
        cipher = AES.new(self.key, AES.MODE_CBC, self.iv.encode("utf-8"))
        return cipher.encrypt(data)

    def decrypt(self, enc):
        cipher = AES.new(self.key, AES.MODE_CBC, self.iv.encode("utf-8"))
        return self.encoder.decode(cipher.decrypt(enc))


구글링으로 여기저기서 조합한 코드다. (출처가 없음은 죄송..)



C#(unity3D) : Padding 알고리즘을 선택할 수 있다

NodeJs : final() 호출하면 알아서 해준다.

Python : 따로 일일이 해줘야 한다.


검색했던 키워드는 python, AES, encryption, pkcs7 padding



python2 와 python3는 문자열, 바이트 처리 방식이 다른 듯 하다.

decode() 안에서 ord()를 사용했는데 python3 넘어오자 그게 필요 없어졌다.


=> TypeError: ord() expected string of length 1, but int found



encrypt 되서 나온 결과물은 base64로 변환해서 전송하는 것이 보통

'Develop' 카테고리의 다른 글

WPF Binding  (0) 2018.11.12
perforce ignore  (0) 2018.09.05
nodejs zip  (0) 2018.02.27
mac 에서 logcat  (0) 2018.02.22
vscode 지금업데이트 안됨  (0) 2017.09.18

콘솔에서 diskpart 에서 


LIST DISK

SELECT DISK [번호]

ATT DISK CLEAR READONLY

DETAIL DISK

SELECT VOL [알파벳]:

ATT VOL CLEAR READONLY

DETAIL VOL

EXIT


다 하고 나면 USB 뺐다 다시 꽂아보면 포멧이 될거다 안되면 밑에 프로그램을 사용하자


http://www.rmprepusb.com/tutorials/54---how-to-fix-write-protected-disks

'etc' 카테고리의 다른 글

vscode ctrl+left 가 안될 때  (0) 2017.09.11
[후기] 센스맘 아이러브  (0) 2017.01.28
해피스팟 서비스  (0) 2016.12.28
LG 스마트폰 DMB 앱 설치, 위치  (0) 2016.12.26
중국 클라우드 서비스 종료  (0) 2016.10.25
import * as fs from 'fs';
import * as JSZip from 'jszip';

let jszip = new JSZip();

jszip.file("aaa.txt", 'aaaa');
jszip.file("bbb.txt", 'bbbb');
jszip.file("ccc.txt", 'cccc');

jszip.generateNodeStream({ type: 'nodebuffer', streamFiles: true })
.pipe(fs.createWriteStream('out.zip'))
.on('finish', function () {
console.log('out.zip');
fs.readFile('out.zip', function (err, data) {
if (err) throw err;
jszip.loadAsync(data).then(async function (zip) {
console.log(zip);
for(let key in zip.files){
console.log(await jszip.file(key).async('text'));
}
});
});
});


여러개의 파일을 압축하고, 다시 압축 푸는것


jszip 공식 홈페이지

http://stuk.github.io/jszip/documentation/examples.html

'Develop' 카테고리의 다른 글

perforce ignore  (0) 2018.09.05
python AES 암호화  (0) 2018.05.17
mac 에서 logcat  (0) 2018.02.22
vscode 지금업데이트 안됨  (0) 2017.09.18
aws lambda express.js 세팅기  (0) 2017.08.23

android studio 안에서 GUI로 보길 원했으나, 

찾을수가 없음.

android studio 공식 홈페이지 에서는 캡쳐화면이 있는데 못찾겠음.


구글링을 해보니 adb logcat 이라고 하라는데,

terminal에서 adb 인식을 못한다.


android sdk를 설치하면 adb가 같이 설치 된다. (옵션 선택 가능)


위치는

/Users/유저홈폴더/Library/Android/sdk/platform-tools


path를 지정해주고

이제부터

adb logcat 하면 로그가 왕창 나온다.


필터링은 구글링을...



  • 우선순위는 다음 문자값 중 하나이며, 가장 낮은 우선순위에서 가장 높은 우선순위로 지정됩니다.
    • V — Verbose (가장 낮은 우선순위)
    • D — Debug
    • I — Info
    • W — Warning
    • E — Error
    • F — Fatal
    • S — Silent(가장 높은 순위, 이 경우 아무 것도 출력되지 않음)
adb logcat *:W


'Develop' 카테고리의 다른 글

python AES 암호화  (0) 2018.05.17
nodejs zip  (0) 2018.02.27
vscode 지금업데이트 안됨  (0) 2017.09.18
aws lambda express.js 세팅기  (0) 2017.08.23
xCode Build error GoogleSignIn/GIDSignIn.h file not found  (0) 2017.05.30

블랙패서 쿠키 개수는?


쿠키 개수 2개


첫번째 것은 영화에서 이어지는 내용
두번째 것은 누구나 예상할 수 있는 그다지 중요하지 않은 내용

다른 사람이 사용하면 mac에서 

사용자만 새로 만들어서 사용하고 있었다.


vscode 업데이트가 있을 때

지금 업데이트 버튼을 누르고

아무 반응이 없다.


vscode의 권한을 보니

drwxr-xr-x   3 paul  staff    102  9 18 17:01 Visual Studio Code.app


gruop이 staff이 되어 있다.


sudo chown -R paul:admin "/Applications/Visual Studio Code.app"

sudo chown -R paul:admin ~/Library/Caches/com.microsoft.VSCode

sudo chown -R paul:admin ~/Library/Caches/com.microsoft.VSCode.ShipIt


하면 잘된다


하지만 업데이트를 하고 나면


다시 staff으로 바뀐다.

  /Applications dscl . -read /Groups/staff

AppleMetaNodeLocation: /Local/Default

GeneratedUID: ABCDEFAB-CDEF-ABCD-EFAB-CDEF00000014

GroupMembers: FFFFEEEE-DDDD-CCCC-BBBB-AAAA00000000

GroupMembership: root

Password: *

PrimaryGroupID: 20

RealName: Staff

RecordName: staff BUILTIN\Users

RecordType: dsRecTypeStandard:Groups

SMBSID: S-1-5-32-545


staff의 정보를 보니 내 이름이 빠져 있다.


sudo dscl . -append /Groups/staff GroupMembership paul


이걸로 나의 이름을 그룹에 넣어줬다.


다음 업데이트가 있을 때 잘되는지 확인후 업데이트 하겠음.



'Develop' 카테고리의 다른 글

nodejs zip  (0) 2018.02.27
mac 에서 logcat  (0) 2018.02.22
aws lambda express.js 세팅기  (0) 2017.08.23
xCode Build error GoogleSignIn/GIDSignIn.h file not found  (0) 2017.05.30
unity3d black screen  (0) 2017.03.22

vscode 에서 

{
        "key": "ctrl+left",
        "command": "workbench.action.navigateBack"
    },
    {
        "key": "ctrl+right",
        "command": "workbench.action.navigateForward"
    }

설정을 쓰려고 했다.

이전 mac mini 에서는 잘되었으나,

imac으로 옮긴뒤로 동작이 안된다.


karabiner 에서는 콘트롤을 누른 상태에서 방향키 인식이 안된다.


시스템 환경설정 -> 키보드 -> 단축키 -> mission control 에 가보면

내가 쓰려던 명령어들이 할당되어 있다.

mission control을 안쓰니까 해제!


그리고 문제 해결!

'etc' 카테고리의 다른 글

micro sd 현재 읽기 전용 상태  (0) 2018.05.09
[후기] 센스맘 아이러브  (0) 2017.01.28
해피스팟 서비스  (0) 2016.12.28
LG 스마트폰 DMB 앱 설치, 위치  (0) 2016.12.26
중국 클라우드 서비스 종료  (0) 2016.10.25

aws에 lambda에 node.js를 붙일수 있는건 알겠는데 

핸들러를 하나씩 등록해야 한다.


express.js를 사용해서 만든 게임서버를 붙여보고 싶다.


keyword는 serverless


awslabs 에서 serverless-express 예제를 만들어 놨다. (링크)


예제를 따라가면.

1. git clone https://github.com/awslabs/aws-serverless-express.git && cd aws-serverless-express/example

2. npm run config -- --account-id="123456789012" --bucket-name="my-unique-bucket"

account-id는 support 메뉴에 있다. (링크)

3. package.jsonsimple-proxy-api.yaml and cloudformation.yaml 에 텍스트 교체 (꼼꼼하게 체크)

4. npm run setup

1. aws cli 설치가 안되어 있으면 에러가 난다. (링크)

2. aws cli은 pip로 설치 해야 한다. (링크)

3. 링크에서 받은 패키지로 설치하면 /Library/Frameworks/Python.framework/Versions/3.6 경로에 설치된다

4. pip3.6 install awscli

5. Unable to locate credentials 에러가 뜬다면 credentials 세팅을 해야 한다

- aws 에서 다운받은 accesskey.csv의 내용을 이용하여

- aws configure

6. s3의 정책 생성 (생성기를 이용)

7. npm run setup 을 하면 설치와 배포까지 완료한다.



'Develop' 카테고리의 다른 글

mac 에서 logcat  (0) 2018.02.22
vscode 지금업데이트 안됨  (0) 2017.09.18
xCode Build error GoogleSignIn/GIDSignIn.h file not found  (0) 2017.05.30
unity3d black screen  (0) 2017.03.22
typescript rest arguments 전달 방법  (0) 2017.02.22

유니티에서 play-games-plugin-for-unity를 사용.

ios 에서는 사용하지 않기 위해 NO_GPGS flag 사용.

ios 빌드시 "GoogleSignIn/GIDSignIn.h file not found" 에러 발생


해결 방법은

xcode -> project build settings 

           -> other linker flags

           -> $(inherited) 삭제

           -> $(OTHER_LDFLAGS) 추가


어찌 하다보니 되긴 하는데 이렇게 해서 꼭 잘 될거라는 보장은 없음

'Develop' 카테고리의 다른 글

vscode 지금업데이트 안됨  (0) 2017.09.18
aws lambda express.js 세팅기  (0) 2017.08.23
unity3d black screen  (0) 2017.03.22
typescript rest arguments 전달 방법  (0) 2017.02.22
object c++ 문자열 쪼개기, url에서 데이터 추출  (0) 2017.02.20

+ Recent posts