GIT 쓸 일이 없다 보니..

일단 리눅스에서 개발하면서 한번 써보면 파악이 되겠지 머..


$ apt-cache search git | grep ^git

git - fast, scalable, distributed revision control system

git-core - fast, scalable, distributed revision control system (obsolete) 

git-all - fast, scalable, distributed revision control system (all subpackages)


step 1. 패키지 설치(안되어 있다면)

$ sudo apt-get install git 


step 2. git 설정

$ git config --global user.name "이름"

$ git config --global user.email "이메일주소"

$ git config --global color.ui "auto" 


step 3. 설정 내용 확인

$ git config --list

user.name=이름

user.email=이메일주소

color.ui=auto

$ vi ~/.gitconfig

[user]

        name = 이름

        email = 이메일주소

[color]

        ui = auto 


step 4. 저장소 생성

$ mkdir git_repo

$ cd git_repo

~/src/git_repo$ git init
초기화: 빈 깃 저장소, 위치 /home/odroid/src/git_repo/.git/ 
$ ll
합계 12
drwxrwxr-x 3 odroid odroid 4096  4월 24 15:56 ./
drwxrwxr-x 5 odroid odroid 4096  4월 24 16:08 ../
drwxrwxr-x 7 odroid odroid 4096  4월 24 15:56 .git/
$ du -h
8.0K    ./.git/info
44K     ./.git/hooks
4.0K    ./.git/objects/info
4.0K    ./.git/objects/pack
12K     ./.git/objects
4.0K    ./.git/branches
4.0K    ./.git/refs/heads
4.0K    ./.git/refs/tags
12K     ./.git/refs
96K     ./.git
100K    .


step 5. 저장소 복제
$ mkdir test
$ cd test
$ git clone ~/src/git_repo/
'git_repo'에 복제합니다...
warning: 빈 저장소를 복제한 것처럼 보입니다.
완료. 


[링크 : http://devaom.com/?p=745]

[링크 : https://git-scm.com/book/ko/v2/Git-서버-프로토콜]



+

bare를 주면 .git 아래 생성될게 바로 생성되는건가?

$ git init --bare --shared

초기화: 빈 공유 깃 저장소, 위치 /home/odroid/src/tt/


$ ll

합계 40

drwxrwsr-x 7 odroid odroid 4096  4월 24 16:08 ./

drwxrwxr-x 5 odroid odroid 4096  4월 24 16:08 ../

-rw-rw-r-- 1 odroid odroid   23  4월 24 16:08 HEAD

drwxrwsr-x 2 odroid odroid 4096  4월 24 16:08 branches/

-rw-rw-r-- 1 odroid odroid  126  4월 24 16:08 config

-rw-rw-r-- 1 odroid odroid   73  4월 24 16:08 description

drwxrwsr-x 2 odroid odroid 4096  4월 24 16:08 hooks/

drwxrwsr-x 2 odroid odroid 4096  4월 24 16:08 info/

drwxrwsr-x 4 odroid odroid 4096  4월 24 16:08 objects/

drwxrwsr-x 4 odroid odroid 4096  4월 24 16:08 refs/


$ du -h

8.0K    ./info

44K     ./hooks

4.0K    ./objects/info

4.0K    ./objects/pack

12K     ./objects

4.0K    ./branches

4.0K    ./refs/heads

4.0K    ./refs/tags

12K     ./refs

96K     .


[링크 : https://git-scm.com/book/ko/v2/Git-서버-서버에-Git-설치하기]


+

shared가 정의되지 않으면 umask에 의해 나오는 결과로 생성하는 것으로 보인다.

근데.. shared만 설정하면 머가 되는진 모르겠네?

 

--shared[=(false|true|umask|group|all|world|everybody|0xxx)]

Specify that the Git repository is to be shared amongst several users. This allows users belonging to the same group to push into that repository. When specified, the config variable "core.sharedRepository" is set so that files and directories under $GIT_DIR are created with the requested permissions. When not specified, Git will use permissions reported by umask(2).

The option can have the following values, defaulting to group if no value is given:

umask (or false)

Use permissions reported by umask(2). The default, when --shared is not specified.

group (or true)

Make the repository group-writable, (and g+sx, since the git group may be not the primary group of all users). This is used to loosen the permissions of an otherwise safe umask(2) value. Note that the umask still applies to the other permission bits (e.g. if umask is 0022, using group will not remove read privileges from other (non-group) users). See 0xxx for how to exactly specify the repository permissions.

all (or world or everybody)

Same as group, but make the repository readable by all users.

0xxx

0xxx is an octal number and each file will have mode 0xxx0xxx will override users' umask(2) value (and not only loosen permissions as group and all does). 0640 will create a repository which is group-readable, but not group-writable or accessible to others. 0660 will create a repo that is readable and writable to the current user and group, but inaccessible to others.

By default, the configuration flag receive.denyNonFastForwards is enabled in shared repositories, so that you cannot force a non fast-forwarding push into it.

If you provide a directory, the command is run inside it. If this directory does not exist, it will be created.


[링크 : https://git-scm.com/docs/git-init#git-init---sharedfalsetrueumaskgroupallworldeverybody0xxx]


위에 기록을 보니..

SGID를 통해서 접근 통제를 하도록(그룹권한을 따름) rws로 설정된다.



+

git 혼자사용으로 검색

[링크 : http://www.internetmap.kr/entry/Simple-Guide-for-Git]


+

2018.04.26

git 콘솔 명령어 목록 모음

[링크 : https://github.com/jeonghwan-kim/git-usage]

'프로그램 사용 > Version Control' 카테고리의 다른 글

git mv 와 log  (0) 2018.08.14
git mv  (0) 2018.08.13
svn 로그 수정 pre-revprop-change  (0) 2017.12.20
svn externals commit 제외하기  (0) 2017.12.10
svn externals 제약사항 (파일은 안됨)  (0) 2017.11.03
Posted by 구차니
Microsoft2018. 4. 24. 15:01

WPF 보다 보니 MVVM 이라는게 나와서 검색


솔찍히 MVC와 다르게 무얼 의미하는지 감이 잘 안오는데

WPF에서 구현된걸 보면

확실히 디자이너와 로직 개발자를 분리하여

제한적이거나 상당부분 개발자가 하던 애니메이션 작업이나 레이아웃 작업을

코드와 상관없이

디자이너가 마음대로 해내고

최소한의 페이지 네비게이션 정도는 지원하여

개발자가 없더라도 디자이너가 기본적인 시나리오 검토까지 가능한

괜찮은 패러다임으로 보인다.




[링크 : https://msdn.microsoft.com/en-us/library/hh848246.aspx?f=255&MSPPError=-2147217396]

[링크 : https://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93viewmodel]

Posted by 구차니
게임/컨트롤러2018. 4. 24. 13:31

음.. 근데 이거는 하나도.. 두개로 나눠진걸 합쳐서 보낼수도 있으려나?


[링크 : https://www.youtube.com/watch?v=1k49VVNHvtU]

[링크 : https://learn.adafruit.com/diy-bluetooth-gamepad/overview]


큭.. 19.95$

좋은 제품이긴 한데 내가 상상한 걸 만들기에는 조금 많이 부족한 듯?

[링크 : https://www.adafruit.com/product/1535]


단순하게 On/Off만 되는 12개 짜리 조이스틱 보드인듯

Control and LEDs

To the right of the power pins, there are some control pins
  • RS - this is the reset pin. To reset the module, pull this pin to ground. It does not affect pairing.
  • L2 - this is the same output that is connected to the PairLED. If you want to put this in a box and have an external Pair indicator LED, wire an LED from this pin, through a 1K resistor, to ground.
  • PB - this is the pair button pin. It is connected to the button onboard that is used to reset the pairing. If you want to make another, external pair button, connect a switch from this key to 3V (not ground!)
  • L1 - this is the same output that is connected to the KeyLED. If you want to put this in a box and have an external Key-press indicator LED, wire an LED from this pin, through a 1K resistor, to ground.
  • RX - this is the UART input, used if you want to send UART->Keypress data, or re-map the buttons. It is 5V compliant, use 3V-5V TTL logic, 9600 baud.
  • TX - this is the UART output, used for watching debug data or re-mapping the buttons. It is 3V logic level output.

[링크 : https://learn.adafruit.com/introducing-bluefruit-ez-key-diy-bluetooth-hid-keyboard/pinouts]



+

HC-05 인지 RN-42인지 잘 모르겠네.. 아무튼 이렇게 설정하면 HID JOYPAD로 인식을 하나보다 ㄷㄷ

    $$$                    //Enter command mode (no CR/LF)

    CMD

    

    SM,6                   //Set Mode = pairing

    AOK

    

    SN,SNESpad             //Set Name

    AOK

    

    S~,6                   //Set profile = HID

    AOK

    

    SH,0240                //Set report descriptor = joypad

    AOK

    

    R,1                    //Reset for settings to take effect.

[링크 : https://mitxela.com/projects/bluetooth_hid_gamepad]


그냥.. BT HID로 설정하고

6바이트 날리면 되는건가?


SoftwareSerial bluetooth(bluetoothRX, bluetoothTX);

//...


// Command Mode

// --------------

bluetooth.begin(9600);

delay(50); 

bluetooth.print("$$$");

delay(50); 

bluetooth.print("SN,HIDJoystick\r\n");

delay(50); 

bluetooth.print(" SU,57\r\n");

delay(50); 

bluetooth.print("S~,6\r\n");

delay(600); 

bluetooth.print("SH,0240\r\n");

delay(200); 

bluetooth.print("R,1\r\n");  

delay(400);


// HID Joystick Report

// --------------

bluetooth.write((byte)0xFD); //Start HID Report

bluetooth.write((byte)0x6);  //Length byte


// 1. X/Y-Axis

bluetooth.write(45);  //First X coordinate

bluetooth.write(-33); //First Y coordinate


// 2. X/Y-Axis

bluetooth.write(45);  //Second X coordinate

bluetooth.write(-33); //Second Y coordinate


// Buttons

bluetooth.write(B10000001); // Second Byte (Buttons 1-8)

bluetooth.write(B10000000); // Second Byte (Buttons 9-16)

[링크 : https://stackoverflow.com/questions/27661297/hid-reports-scan-codes-for-rn-42-hids-gamepad-profile]



+

RN-42

[링크 : http://eleparts.co.kr/goods/view?no=3555519] 48590

[링크 : http://eleparts.co.kr/goods/view?no=2276606]  22600


정확하게는 RN-42로는 안되고(SPP만 지원) RN42HID나 RN42NHID로 된 녀석이 필요하다.

대충 찾아 보는데.. RN42HID로 된 녀석들이 잘 안보이는지라.. 잘못샀다가는 돈만 날릴 듯?

[링크 : http://ww1.microchip.com/downloads/en/DeviceDoc/50002328A.pdf]


+

FB155BC

모델명은 같은데 HID 여부가 다르니 주의 

30000원 / 정찰가 인듯?

[링크 : http://www.eleparts.co.kr/goods/view?no=2161507]

[링크 : http://www.devicemart.co.kr/1065515]

'게임 > 컨트롤러' 카테고리의 다른 글

pxn2119pro 중고구매  (0) 2025.01.06
ex m air 펌웨어 (안드로이드 갤럭시 S10)  (0) 2023.01.25
조이스틱 분해 그리고.. 수...리?  (4) 2018.04.10
조이트론 두고보자.. ㅠㅠ  (2) 2018.04.09
track IR  (2) 2018.04.08
Posted by 구차니
개소리 왈왈/독서2018. 4. 24. 08:36

술술 잘 읽히는 재미있는 책

다만 소개서 수준이지 기술서적은 아니라

VR에 호기심이 많은 사람들에게는 도움이 될 만한 책이다.


근데 신기한 용어 발견


MIXED REALITY(혼합현실)

REAL ENVIRONMENT(현실)

- 그냥 우리가 사는 곳

AUGMENTED REALITY(증강현실)

- 물건에 덧 씌우는

AUGMENTED VIRTUALITY(증강가상)

- 현실의 물건을 가상의 세계로 통합

VIRTUAL ENVIRONMENT(가상)

- 이게 VR 인가?

[링크 : https://en.wikipedia.org/wiki/Reality%E2%80%93virtuality_continuum]

[링크 : https://en.wikipedia.org/wiki/Mixed_reality]


[링크 : http://www.kyobobook.co.kr/product/detailViewKor.laf?barcode=9788959894444]

'개소리 왈왈 > 독서' 카테고리의 다른 글

책 - 혼자 공부하는 가상현실 개념사전  (0) 2018.04.27
책 - WPF MVVM 일주일 만에 배우기  (2) 2018.04.27
책 - 챗봇혁명  (0) 2018.04.23
책 - 아버지의 인생수첩  (0) 2018.04.22
책 - 인생 망치는 법  (0) 2018.04.19
Posted by 구차니
개소리 왈왈/독서2018. 4. 23. 19:14

2016년 일본책

지금시점에서는 당연하고 별 기대도 없으며 당연한 기술이 된 챗봇이다


챗봇은 어떤 의미로는 HCI로서

컴퓨터/인공지능과 사람을 잇는 유저 인터페이스로 존재하지

챗봇 자체적으로 어떠한 무엇이 되진 못하지 않을까?


기술이 성숙해서

입력을 음성으로 받으면 시리

채팅으로 받으면 챗봇이 되는건데

이상의 어떠한 의미가 있을까?


진짜 중요한 건 그 뒤에 있는

인공지능을 위한 백데이터와

사용자별 특화 데이터

그리고 그 중에 답을 찾는 로직인데 말이다


기술이 더 발전해서 BCI가 당연한 시대가 온다면

뇌파나 직접 네트워크 연결을 통한 채팅이 챗봇의 미래가 아닐까?



알렉사 문제에 있듯(TV 소리 듣고 주문해버림)

사용자 목소리 인식이나, 상황 및 문맥 인식, 평소 행적을 통한 간접 인증 등

인간적인 행위들을 위한 많은 비인간적인 데이터들이

그 사람의 가상인격을 위한 백데이터로 축적되고

인공인격에 의한 에뮬레이션을 통해 비서를 규현해 낸다면

사용자 편의는 올라가겠지만


반대로 그렇게 구현된 인격은 자신인가

인간의 존재의의는? 라는 인간 정체성 문제가 발생하지 않을까?

내가 사라져도 AI에 의해 구현된 나의 인격이 존재해서 독립적으로 작동이 가능하다면

그거야 말로 내가 사라져도 다른 사람들이 알지 못한다는 공포로 연결되지 않을까?


[링크 : https://www.kyobobook.co.kr/product/detailViewKor.laf?barcode=9791157830831]

Posted by 구차니
embeded/raspberry pi2018. 4. 23. 14:16

오.. 어떤식으로 쓸 수 있을지 모르겠지만

라즈베리 3B 되면서 PMIC가 장착되었다고 한다.


근데 벤치상에... 3B는 그나마 양호한데..

3B+의 자비없는 대기전력.. ㄷㄷ (생각해보면 Odroid U3 급이긴 한데 성능은 누가 나으려나?)

[링크 : https://www.raspberrypi.org/magpi/raspberry-pi-specs-benchmarks/]


Witty Pi 라는 HAT은 RTC와 Power on/off 기능 추가

전원 버튼이 HAT에 추가되고 그걸 누르면 On 되고

On 상태에서 Off를 누르면 라즈베리가 SW적으로 종료절차를 따르게 된다.

Suspend도 지원하는 매력적인 녀석 (23.04USD 꽤 쎄네...)

[링크 : http://www.uugear.com/witty-pi-realtime-clock-power-management-for-raspberry-pi/]

  [링크 : https://www.raspberrypi.org/forums/viewtopic.php?t=149008]


I2C를 켜라고 하는것 봐서는 I2C를 통해 리눅스에게 전원 On/Off 상태를 알려주도록 되어 있는 듯?

Please notice that sudo is necessary to run this script. This script will automatically do 

these tasks in order:

1. Enable I2C on your Raspberry Pi

2. Install i2cctools, if it is not installed yet

3. Configure Bluetooth to use minicUART (Raspberry Pi 3 only)

4. Install wiringPi, if it is not installed yet

5. Install Witty Pi programs, if they are not installed yet

[링크 : http://www.uugear.com/doc/WittyPi_UserManual.pdf]



3B+은 2018년 3월 출시되었고

CPU 클럭 1.2->1.4로 상향

기가비트 이더넷 추가, PoE Ready

802.11ac 추가

의 차이가 존재한다.

[링크 : https://www.datenreise.de/en/raspberry-pi-3b-and-3b-in-comparison/]

'embeded > raspberry pi' 카테고리의 다른 글

rpi firmata  (0) 2018.05.11
라즈베리 2B 효용성에 대해서...  (2) 2018.05.09
rpi img 생성하기  (0) 2018.04.18
라즈베리 저전력 관련 설정  (0) 2018.04.17
라즈베리 파이 배포용 이미지 만들기  (0) 2018.02.23
Posted by 구차니
Linux API/linux2018. 4. 23. 13:46

잘은 모르겠지만.. PC에서 쓰이는 PWRBTN  같은 전원관련 스위치들은

PMIC를 통해 인터럽트를 발생시킨다고 하는데..

GPIO를 통한 인터럽트인지 I2C(혹은 SMBUS)를 통해 통보받은걸 인터럽트로 넘겨주는건진 모르겠다.


2.7.15 Power Control Signals

i.MX6 Qseven PMIC SOM supports two power control signals PWGIN and PWRBTN# on Qseven Edge connector.

PWGIN input from Qseven Edge connector is the active high signal which is used to enable the power of i.MX6

Qseven PMIC SOM. For more details on PWRGIN signal usage, refer section 3.1.2.

i.MX6 Qseven PMIC SOM supports PWRBTN# input from Qseven Edge connector which is the active low signal and

connected to i.MX6 CPU’s ONOFF pin. This pin can be used to On/Off the i.MX6 CPU by connecting push button in

the carrier board. When the board power is On, a button press between 750ms to 5s will send an interrupt to core to

request software to bring down the i.MX6 safely (if software supports). Otherwise, button press greater than 5s

results in a direct hardware power down which is applicable when software is unable to power Off the device. When

the i.MX6 CPU power supply is Off, a button press greater in duration than 750ms asserts an output signal to request

power from a power IC to power up the i.MX6 CPU. 

[링크 : http://www1.futureelectronics.com/doc/IWAVE%20SYSTEMS%20TECHNOLOGIES/G15MDataSheet.pdf]


 +static irqreturn_t pb_isr(int irq, void *dev_id)

+{

+ int ret;

+ int state;

+

+ ret = intel_soc_pmic_readb(DC_TI_SIRQ_REG);

+ if (ret < 0) {

+ pr_err("[%s] power button SIRQ REG read fail %d\n",

+ pb_input->name, ret);

+ return IRQ_NONE;

+ }

+

+ state = ret & SIRQ_PWRBTN_REL;

+

+ if (force_trigger && state) {

+ /* If we lost the press interrupt when short pressing

+ * power button to wake up board from S3, simulate one.

+ */

+ input_event(pb_input, EV_KEY, KEY_POWER, 1);

+ input_sync(pb_input);

+ input_event(pb_input, EV_KEY, KEY_POWER, 0);

+ input_sync(pb_input);

+ } else {

+ input_event(pb_input, EV_KEY, KEY_POWER, !state);

+ input_sync(pb_input);

+ pr_info("[%s] power button %s\n", pb_input->name,

+ state ? "released" : "pressed");

+ }

+

+ if (force_trigger)

+ force_trigger = 0;

+

+ return IRQ_HANDLED;

+}

+

+static int pb_probe(struct platform_device *pdev)

+{

+ int ret;

+

+ pwrbtn_irq = platform_get_irq(pdev, 0);

+ if (pwrbtn_irq < 0) {

+ dev_err(&pdev->dev,

+ "get irq fail: irq1:%d\n", pwrbtn_irq);

+ return -EINVAL;

+ }

+ pb_input = input_allocate_device();

+ if (!pb_input) {

+ dev_err(&pdev->dev, "failed to allocate input device\n");

+ return -ENOMEM;

+ }

+ pb_input->name = pdev->name;

+ pb_input->phys = "power-button/input0";

+ pb_input->id.bustype = BUS_HOST;

+ pb_input->dev.parent = &pdev->dev;

+ input_set_capability(pb_input, EV_KEY, KEY_POWER);

+ ret = input_register_device(pb_input);

+ if (ret) {

+ dev_err(&pdev->dev,

+ "failed to register input device:%d\n", ret);

+ input_free_device(pb_input);

+ return ret;

+ }

+

+ ret = request_threaded_irq(pwrbtn_irq, NULL, pb_isr,

+ IRQF_NO_SUSPEND, DRIVER_NAME, pdev);

+ if (ret) {

+ dev_err(&pdev->dev,

+ "[request irq fail0]irq:%d err:%d\n", pwrbtn_irq, ret);

+ input_unregister_device(pb_input);

+ return ret;

+ }

+

+ return 0;

+}

[링크 : https://github.com/.../uefi/cht-m1stable/patches/PWRBTN-add-driver-for-TI-PMIC.patch]


> +int intel_soc_pmic_set_pdata(const char *name, void *data, int len)

> +{

> + struct cell_dev_pdata *pdata;

> +

> + pdata = kzalloc(sizeof(*pdata), GFP_KERNEL);

> + if (!pdata) {

> + pr_err("intel_pmic: can't set pdata!\n");

> + return -ENOMEM;

> + }

> +

> + pdata->name = name;

> + pdata->data = data;

> + pdata->len = len;

> +

> + list_add_tail(&pdata->list, &pdata_list);

> +

> + return 0;

> +}

> +EXPORT_SYMBOL(intel_soc_pmic_set_pdata); 

[링크 : https://patchwork.kernel.org/patch/4227571/]



+

근데... 정기적으로 읽긴 그런 애매한 녀석이고..

이걸 인터럽트로 어떻게 던지지?



[링크 : https://www.intel.com/.../datasheets/7-series-chipset-pch-datasheet.pdf]

'Linux API > linux' 카테고리의 다른 글

fopen64  (0) 2019.06.24
ubuntu iio rotate key 찾기 또 실패  (0) 2019.05.27
linux kernel governor 관련 코드  (0) 2018.04.17
linux shared memory 관련  (0) 2016.12.22
linux ipc  (0) 2016.12.20
Posted by 구차니

기본 제공량 11G 다 쓰고 나서는

예전에 프로모션으로 제공된 100G가 자동으로 사용되고

총 잔여량이 99.81GB로 차감되서 사용된다.


근데.. 할일도 없이(?)

데이터 소진해서 정말로 되나 확인한다고

인터넷만 잡고 살았더니 삶이 피폐해진 느낌...




+

히이익 위약금.. 약정만료일 그켬!!!! ㅠㅠ


'개소리 왈왈 > 모바일 생활' 카테고리의 다른 글

게임 튜너와 안드로이드 해상도  (0) 2018.10.03
pf1000u와 3d 안경  (0) 2018.08.28
wibro egg 해지 청구서 도착  (0) 2018.04.16
egg 상품권 소식이 없네...  (0) 2018.04.12
LTE egg 도착!  (4) 2018.03.24
Posted by 구차니
개소리 왈왈/독서2018. 4. 22. 23:44

그냥 토닥토닥 해주는 책

가끔 아들을 언급하거나

자기 직접을 말할때 빼고는

부드러운 도덕책 읽는 느낌이라고 해야하나?

이렇게 살아왔고 이랬던 적도 있고

이런게 아쉬웠던 때도 있고

그렇게 살아왔고 그렇게 살아간다 라는 따스한 내용



[링크 : http://www.kyobobook.co.kr/product/detailViewKor.laf?&barcode=9791156024200]

Posted by 구차니
이론 관련/전기 전자2018. 4. 22. 23:24

Simple PLD - SPLD ?

Complex PLD - CPLD


GAL : Generic Logic Array

PAL :  Programmable Array Logic

PLD : Programmable Logic Device

CPLD : Complex Programmable Logic Device

FPGA : Field Programmable Gate Array 

[링크 : https://www.embeddedrelated.com/showthread/comp.arch.embedded/9278-1.php]

'이론 관련 > 전기 전자' 카테고리의 다른 글

balanced unbalanced  (0) 2018.05.14
MFCCs - Mel-frequency cepstral coefficients  (0) 2018.05.02
pmos nmos cmos  (0) 2018.04.12
Retiming  (0) 2018.04.12
XNOR ?  (0) 2018.04.12
Posted by 구차니