'잡동사니'에 해당되는 글 13451건

  1. 2023.01.03 golang unsafe
  2. 2023.01.03 golang 웹 pprof
  3. 2023.01.02 barrier - fork of synergy
  4. 2023.01.01 23년!
  5. 2022.12.31 22년의 마지막 날
  6. 2022.12.30 밖으로 나가서 도는 바쁜 하루
  7. 2022.12.29 휴가는 낮잠
  8. 2022.12.28 확전이라니
  9. 2022.12.27 맥북 초기화 하기
  10. 2022.12.27 linux i2c 예제
Programming/golang2023. 1. 3. 19:03

멀 하던 성능을 위해서는 unsafe를 쓸 수 밖에 없나?

shared memory의 내용을 Binary Reader를 통해 읽으니 이상하리 만치 너~~~무 느리다.

 

[링크 : https://hackernoon.com/golang-unsafe-type-conversions-and-memory-access-odz3yrl]

'Programming > golang' 카테고리의 다른 글

golang map 에 데이터 추가하기  (0) 2023.01.13
golang reflect  (0) 2023.01.03
golang 웹 pprof  (0) 2023.01.03
golang shared memory 모듈  (0) 2022.11.22
golang net.TCPConn  (0) 2022.10.07
Posted by 구차니
Programming/golang2023. 1. 3. 15:21

0.0.0.0:6060 으로 하면 외부에서도 접근 가능하게 설정이 가능하다.

근데 멀 눌러야 사용율이 잘 나올까...

 

import _ "net/http/pprof"

go func() {
    log.Println(http.ListenAndServe("localhost:6060", nil))
}()

[링크 : https://coralogix.com/blog/optimizing-a-golang-service-to-reduce-over-40-cpu/]

[링크 : https://pkg.go.dev/net/http/pprof]

'Programming > golang' 카테고리의 다른 글

golang reflect  (0) 2023.01.03
golang unsafe  (0) 2023.01.03
golang shared memory 모듈  (0) 2022.11.22
golang net.TCPConn  (0) 2022.10.07
golang 변수 타입 알아내기  (0) 2022.10.05
Posted by 구차니
파일방2023. 1. 2. 10:50

요즘은 원격으로 쓰지 컴퓨터를 건너 다니면서 같이 쓰진 않아 관심이 멀어졌었는데

synergy도 유료화 되고 그러면서 남은게(?) barrier 정도 인 듯?

 

[링크 : https://github.com/debauchee/barrier]

What is it?
Barrier is software that mimics the functionality of a KVM switch, which historically would allow you to use a single keyboard and mouse to control multiple computers by physically turning a dial on the box to switch the machine you're controlling at any given moment. Barrier does this in software, allowing you to tell it which machine to control by moving your mouse to the edge of the screen, or by using a keypress to switch focus to a different system.

Barrier was forked from Symless's Synergy 1.9 codebase. Synergy was a commercialized reimplementation of the original CosmoSynergy written by Chris Schoeneman.

At the moment, barrier is not compatible with synergy. Barrier needs to be installed on all machines that will share keyboard and mouse.

[링크 : https://alternativeto.net/software/synergy/]

[링크 : https://bundw.tistory.com/42]

'파일방' 카테고리의 다른 글

bytran - hitran 시뮬레이터?  (0) 2023.08.21
kchmviewer  (0) 2023.06.14
fsn (fusion) - file system navigator  (0) 2022.08.26
tsdb influxdb  (0) 2022.07.05
rufus - symbol 'grub_register_command_lockdown' not found  (0) 2022.06.27
Posted by 구차니

아! 나이 먹어서 싫다 ㅠㅠ

먼가 마음을 정리하고 사려고 했더니 팔려버리는 마법 ㅜㅜ

'개소리 왈왈 > 직딩의 비애' 카테고리의 다른 글

야근의 시작인가  (0) 2023.01.12
피곤  (0) 2023.01.10
오픈소스의 몰락? 공급망 공격  (0) 2022.12.23
생애 첫 ABS 작동  (2) 2022.12.21
주말 출근  (0) 2022.12.17
Posted by 구차니

장모님 댁에 식료품 배달하러 왕복 5시간 다녀옴

저녁 조금 먹고 와서 애들이 배고파 하네..

'개소리 왈왈 > 육아관련 주저리' 카테고리의 다른 글

쉬는날인데 쉬는게 아닌느낌  (0) 2023.01.28
애견미용 후 천국행 할 뻔  (0) 2023.01.24
밖으로 나가서 도는 바쁜 하루  (0) 2022.12.30
휴가는 낮잠  (0) 2022.12.29
크리스마스  (0) 2022.12.25
Posted by 구차니

첫애 방학식이라 이제 드디어 방학!

아내 진단서 끊으러 강남갔다가

점심은 밖에서 먹고

키즈카페 보내버리고 돌아오니 5시?

애들 씻기고 기절하고 일어나니.. 9시..

 

얘들아.. 배고프면 좀 깨워 ㅠㅠ

'개소리 왈왈 > 육아관련 주저리' 카테고리의 다른 글

애견미용 후 천국행 할 뻔  (0) 2023.01.24
22년의 마지막 날  (0) 2022.12.31
휴가는 낮잠  (0) 2022.12.29
크리스마스  (0) 2022.12.25
크리스마스 이브  (0) 2022.12.24
Posted by 구차니

목,금 회사 특별휴가인데 잠만 자는 듯.

 

'개소리 왈왈 > 육아관련 주저리' 카테고리의 다른 글

22년의 마지막 날  (0) 2022.12.31
밖으로 나가서 도는 바쁜 하루  (0) 2022.12.30
크리스마스  (0) 2022.12.25
크리스마스 이브  (0) 2022.12.24
dog 피곤  (0) 2022.12.20
Posted by 구차니

휴전중이니 전쟁중이기는 하지만

전쟁을 키우는건 휴전을 파기하고 개전, 전면전을 하겠다는 건가?

 

“확전 각오했다”… 尹대통령, 北에 무인기 침투 직접 지시

[링크 : https://v.daum.net/v/20221228055211172]

Posted by 구차니
Apple2022. 12. 27. 18:56

한번 시도해봐야지 (팔아먹겠단 소리)

 

 

맥북에어 2012의 경우 사과 나올때 까지 command - r 누른채로 부팅하면 복구모드로 들어간다.

OS만 설치해서는 개인설정들 남아있어 파티션을 날리고 OS 설치해야 한다.

일종의 ramdisk로 되서 파티션 날려도 복구는 문제가 없는건가?

[링크 : https://stopoverhere.tistory.com/entry/맥북-초기화-방법-맥-OS-재설치-하기]

[링크 : https://deep-i.tistory.com/m/29]

 

'Apple' 카테고리의 다른 글

애플 무선 키보드 주웠다 버림  (0) 2024.01.01
맥북에어 외부 모니터 사용하기 + 화면끄기  (2) 2022.08.27
macos catalina iso 파일  (0) 2022.06.23
macos iso  (0) 2022.06.20
맥 화면 90도 돌리기  (0) 2022.06.18
Posted by 구차니
embeded/i2c2022. 12. 27. 11:02

i2c read 예제

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <fcntl.h>
#include <sys/ioctl.h>
#include <errno.h>
#include <linux/i2c-dev.h>
#include <linux/i2c.h>

const int bus = 0;
const unsigned long slave_addr = 0xA0;
const unsigned short sub_addr = 0x10;

int main()
{
int fd;
int rval;
char path[20];
unsigned char buf[2];
unsigned char rxd[1];

sprintf(path, "/dev/i2c/%d", bus);

fd = open(path, O_RDWR);

if ((fd < 0) && (errno == ENOENT)) {
sprintf(path, "/dev/i2c-%d", bus);

fd = open(path, O_RDWR);
}

if (fd < 0) {
fprintf(stderr, "Can't open file '/dev/i2c-%d' or '/dev/i2c/%d': %s\r\n", bus, bus, strerror(errno));

exit(EXIT_FAILURE);
}

// Read 1byte
ioctl(fd, I2C_SLAVE, slave_addr);

buf[0] = (sub_addr & 0xFF00) >> 8;
buf[1] = sub_addr & 0xFF;

if ((rval = write(fd, buf, 2)) < 0) {
fprintf(stderr, "Writing error! (%lX): %s\r\n", slave_addr, strerror(errno));

exit(EXIT_FAILURE);
}

if ((rval = read(fd, rxd, sizeof(unsigned char))) < 0) {
fprintf(stderr, "Reading error! (%lX): %s\r\n", slave_addr, strerror(errno));

exit(EXIT_FAILURE);
}

fprintf(stdout, "Read 1byte = 0x%02X\r\n", rxd[0]);

close(fd);

return 0;
}

[링크 : https://infoarts.tistory.com/40]

[링크 : https://southlife.tistory.com/21]

'embeded > i2c' 카테고리의 다른 글

i2cdump  (0) 2024.12.11
i2c 자료  (0) 2018.04.26
i2c mode - tm4c  (0) 2018.04.26
i2c BUS에 pull-up, pull-down  (0) 2018.04.26
i2c bank switching  (0) 2015.09.02
Posted by 구차니