Skip to content

Instantly share code, notes, and snippets.

View Rahmanism's full-sized avatar
💻
I'm coding!

Rahmani Rahmanism

💻
I'm coding!
View GitHub Profile
@Rahmanism
Rahmanism / vscode-indentation-active.json
Created January 21, 2023 09:43
To change indentation vertical line color in VSCode, set this in json settings
"workbench.colorCustomizations":{
"editorIndentGuide.activeBackground":"#06a"
}
@Rahmanism
Rahmanism / media-orientation.css
Created January 21, 2023 09:42
Orientation in CSS media query
@media (orientation: landscape) {
/* some css code */
}
@Rahmanism
Rahmanism / guid.ps1
Created January 17, 2023 20:17
Create GUID code in Powershell
[guid]::NewGuid()
@Rahmanism
Rahmanism / install-whl-package.sh
Created January 7, 2023 09:15
To install whl python packages
pip install package_name.whl
# https://stackoverflow.com/a/64450982/3144631
@Rahmanism
Rahmanism / install-ssl-nextcloud.sh
Created January 3, 2023 07:21
Install custom SSL certificate in NextCloud (installed with snap)
# First copy your cert files into /var/snap/nextcloud/current/certs/custom/
nextcloud.enable-https custom -s cert.pem privkey.pem chain.pem
@Rahmanism
Rahmanism / nextcloud-renew-letsencrypt.sh
Created January 3, 2023 07:19
Renew LetsEncrypt in NextCloud
nextcloud.enable-https lets-encrypt
@Rahmanism
Rahmanism / wait-promise.js
Last active January 7, 2023 09:16
JavaScript wait function with promise
function wait(time) {
return new Promise(resolve => {
setTimeout(resolve, time)
})
}
@Rahmanism
Rahmanism / allow-scripts-powershell.ps1
Created January 2, 2023 10:13
Let scripts run in Powershell for current user
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope currentuser
@Rahmanism
Rahmanism / scrolled.js
Last active January 7, 2023 09:16
To check if user scrolled to the bottom of an HTML element
const elem = document.querySelector('#elem')
elem.onscroll = () => {
if (elem.clientHeight + elem.scrollTop >= elem.scrollHeight) {
console.log('You\'ve reached the bottom of text.')
}
}
@Rahmanism
Rahmanism / find_changed_issues_in_jira.jql
Last active August 30, 2021 14:48
JQL to find all issues in Jira that their status has changed in a specific date to a specific status
project = "YourProject" and status changed from "Done" to "open" and status changed on "2021/08/30" ORDER BY created DESC