MSSql Server 사용자 편집 에러
백업에서 복원시 사용자 정보 수정시 에러 날때.
EXEC sp_change_users_login 'Auto_Fix', '계정이름'
작업 스케줄링 작동 안될때 : No scheduled commands are ready to run
$ php artisan schedule:run
No scheduled commands are ready to run.
$ php artisan up
Application is now live.
$ php artisan schedule:run
Running scheduled command:
.vim에서 마지막 수정위치 기억하기
원문 : https://saturnkim.dev/posts/vim-remembering-last-position/
vimrc
if has("autocmd")
au BufReadPost * if line("'\"") > 1 && line("'\"") <= line("$") | exe "normal! g'\"" | endif
endif
chown username .viminfo
전체 환경에 적용하려면 /etc/vim/vimrc에 추가
현재 커널 확인
# uname -r
4.15.0-208-generic
설치된 모든 커널 확인
# dpkg --list|grep "linux-image\|linux-headers\|linux-modules"
ii linux-headers-4.15.0-208 4.15.0-208.220 all Header files related to Linux kernel version 4.15.0
ii linux-headers-4.15.0-208-generic 4.15.0-208.220 amd64 Linux kernel headers for version 4.15.0 on 64 bit x86 SMP
ii linux-headers-generic 4.15.0.208.191 amd64 Generic Linux kernel headers
ii linux-image-4.15.0-208-generic 4.15.0-208.220 amd64 Signed kernel image generic
pi linux-image-4.4.0-210-generic 4.4.0-210.242 amd64 Signed kernel image generic
ii linux-image-generic 4.15.0.208.191 amd64 Generic Linux kernel image
ii linux-modules-4.15.0-208-generic 4.15.0-208.220 amd64 Linux kernel extra modules for version 4.15.0 on 64 bit x86 SMP
pi linux-modules-4.4.0-210-generic 4.4.0-210.242 amd64 Linux kernel extra modules for version 4.4.0 on 64 bit x86 SMP
ii linux-modules-extra-4.15.0-208-generic 4.15.0-208.220 amd64 Linux kernel extra modules for version 4.15.0 on 64 bit x86 SMP
pi linux-modules-extra-4.4.0-210-generic 4.4.0-210.242 amd64 Linux kernel extra modules for version 4.4.0 on 64 bit x86 SMP
자동삭제
# apt autoremove
수동삭제
# apt purge linux삭제커널
selenium 스크롤 내리기
출처 : https://youtu.be/yQ20jZwDjTE?t=14429
interval = 2
prev_height = browser.execute_script('return document.body.scrollHeight')
while True:
browser.execute_script('window.scrollTo(0, document.body.scrollHeight)')
time.sleep(interval)
curr_height = browser.execute_script('return document.body.scrollHeight')
if curr_height == prev_height:
break
prev_height = curr_height
print('스크롤 완료')
I : 문장시작(입력모드)
A : 문장끝(입력모드)
0 : 문장 앞으로 이동
$ : 문장 뒤로 이동
H : 화면 위
M : 화면 중간
L : 화면 끝
gg : 파일 앞
G : 파일 끝
20G: 20번째 줄로 이동
w : 단어 이동 (nw, 3w-> 3단어씩 이동)
b : 단어 뒤로 이동 (nb, 4b)
ctrl+u : 위로 스크롤링
ctrl+d : 아래로 스크롤링
{ : 문단 시작
} : 문단 끝
x : 커서 위치의 글자 삭제
dd : 문장삭제
yy : 문장복사
p : 붙여넣기
*p : 클립보드 붙여넣기
I : 문장시작(입력모드)
A : 문장끝(입력모드)
0 : 문장 앞으로 이동
$ : 문장 뒤로 이동
H : 화면 위
M : 화면 중간
L : 화면 끝
gg : 파일 앞
G : 파일 끝
20G: 20번째 줄로 이동
w : 단어 이동 (nw, 3w-> 3단어씩 이동)
b : 단어 뒤로 이동 (nb, 4b)
ctrl+u : 위로 스크롤링
ctrl+d : 아래로 스크롤링
{ : 문단 시작
} : 문단 끝
x : 커서 위치의 글자 삭제
dd : 문장삭제
yy : 문장복사
p : 붙여넣기
*p : 클립보드 붙여넣기
Laravel에서 Cron 작업으로 Task Scheduling을 설정하는 방법
원문 : tutsforweb.com/how-to-set-up-task-scheduling-cron-job-in-laravel/
커맨드 생성
php artisan make : command WordOfTheDay
스케쥴링 등록
app / Console / Kernel.php
crontab 등록
* * * * * cd /path-to-your-project && php artisan schedule:run >> /dev/null 2>&1
기본적인 Vagrant 명령어 모음
원문 : junistory.blogspot.com/2017/08/virtualbox-vagrant.html
기본적인 Vagrant 명령어 모음
명령어설명
vagrant up | 가상머신 기동 |
vagrant status | 가상머신 상태 확인 |
vagrant ssh | 가상머신에 접속 |
vagrant halt | 가상머신 정지 |
vagrant suspend | 가상머신 휴면 |
vagrant resume | 가상머신 휴면에서 복원 |
vagrant reload | 가상머신 재시동 |
vagrant destroy | 가상머신 제거 |
linux find & replace
https://linuxize.com/post/how-to-use-sed-to-find-and-replace-string-in-files/
sed -i 's/SEARCH_REGEX/REPLACEMENT/g' INPUTFILE
sed -i 's/Date(2013, 1, 1)/Date(2020, 1, 1)/g' *.php
sed -i 's/Date(2020, 6, 25)/Date(2025, 12, 31)/g' *.php