AWS ec2 에서 최근에는 ntp보다 chrony를 많이 사용한다.
1. sudo vi /etc/chrony.conf 에서
server 169.254.169.123 prefer iburst
를 넣는다. 1줄만 있어도 된다.
2. sudo systemctl restart chronyd
3. chronyc sources -v
-> 소스서버가 제대로 반영되었는지 확인 (check)
4. date 로 시간확인.
AWS ec2 에서 최근에는 ntp보다 chrony를 많이 사용한다.
1. sudo vi /etc/chrony.conf 에서
server 169.254.169.123 prefer iburst
를 넣는다. 1줄만 있어도 된다.
2. sudo systemctl restart chronyd
3. chronyc sources -v
-> 소스서버가 제대로 반영되었는지 확인 (check)
4. date 로 시간확인.
단, https에서만 동작한다.
async function copyImageToClipboard(imageUrl) {
try {
const response = await fetch(imageUrl);
const blob = await response.blob();
await navigator.clipboard.write([
new ClipboardItem({
[blob.type]: blob
})
]);
console.log('Image copied to clipboard');
} catch (err) {
console.error('Failed to copy image: ', err);
}
}
// 이미지 URL과 버튼 클릭 이벤트 핸들러
document.getElementById('copyImageButton').addEventListener('click', function() {
const imageUrl = 'path/to/your/image.png';
copyImageToClipboard(imageUrl);
});