This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Copyright © 2021 Chirag Bhatia | |
# Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: | |
# The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. | |
# THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOF |
- Open /etc/default/grub and ensure this line exists:
GRUB_DEFAULT=saved
- Apply the change to grub.cfg by running:
grub2-mkconfig -o /boot/grub2/grub.cfg
- Run this to set default to Windows
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
window.addEventListener('scroll', (evt) => { | |
const loadMoreBtn = document.querySelector('.loadMoreBtn'); | |
if ((loadMoreBtn.offsetTop) < (scrollY + 1000)) { | |
loadMoreBtn.click(); | |
} | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Create array of file list from a directory. | |
$arr = (dir).FullName #Get all files | |
$arr = (dir *.log).FullName #Get files of .log extension | |
#Get headers of file to identify its format. | |
Get-Content -Path FilePath -Encoding Byte -TotalCount 4 | |
#Download File via http. | |
Invoke-WebRequest "http://filepath/file.jpg" -OutFile "C:\LocalPath\filename.jpg" |
- Leetcode
- HackerRank
- hackerearth
- codewars
- Project Euler
- [InterviewBit](https://www.interviewbit.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### Merge two dataframes when both have a common column with common values (e.g. id) | |
pd.merge(df1, df2, how='inner', on='id') |
NewerOlder