Skip to content

Instantly share code, notes, and snippets.

View hayatibis's full-sized avatar
🏠
Working from home

Hayati hayatibis

🏠
Working from home
View GitHub Profile
@hayatibis
hayatibis / average.js
Last active October 19, 2023 07:28
Average Price
var selector = '#searchResultsTable > tbody > tr > td.searchResultsPriceValue > div > span'
var elements = document.querySelectorAll(selector)
var totalPrice = 0;
for (var i = 0; i < elements.length; i++) {
var element = elements[i];
var priceText = element.textContent || '';
var price = parseInt(priceText.replace('TL', '').replace('.', '').trim(), 10);
if (!isNaN(price)) {
totalPrice += price;
}
@hayatibis
hayatibis / settings.json
Created May 18, 2023 14:35
VSCode settings (2023)
{
"[python]": {
"editor.formatOnType": true
},
"workbench.iconTheme": "vscode-icons",
"workbench.colorTheme": "Noctis Azureus",
"workbench.preferredDarkColorTheme": "Noctis Azureus",
"workbench.sideBar.location": "right",
"yaml.customTags": [
"!And",
@hayatibis
hayatibis / to8gb.txt
Last active June 25, 2019 07:33
Ubuntu Resize Swap Area
sudo swapoff -a
sudo dd if=/dev/zero of=/swapfile bs=1G count=8
sudo mkswap /swapfile
sudo swapon /swapfile
grep SwapTotal /proc/meminfo
Ref: https://bogdancornianu.com/change-swap-size-in-ubuntu/