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
from enum import Enum | |
import requests | |
from lxml import etree | |
DATA_URL = "https://api.genelpara.com/iframe/?symbol=para-birimleri&pb=USD,EUR" | |
USD_XPATH = "/html/body/div/div/div/ul[1]/li[3]/span" | |
EUR_XPATH = "/html/body/div/div/div/ul[2]/li[3]/span" | |
class Currency(Enum): |
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
grep -f <(lspci | grep USB | cut -d " " -f 1) \ | |
<(cat /proc/acpi/wakeup) | cut -c 1-4 | tr -d '\t' \ | |
| sed -e 's|^|echo |' -e 's|$| > /proc/acpi/wakeup|' -e '1s|^|#!/bin/bash\n|' \ | |
| sudo tee /usr/local/bin/nowakeupusb >/dev/null \ | |
&& sudo chmod +x /usr/local/bin/nowakeupusb && printf '%s\n' '[Unit]' \ | |
'Description=no-wakeup-usb' '[Service]' \ | |
'ExecStart=/usr/local/bin/nowakeupusb' \ | |
'[Install]' 'WantedBy=multi-user.target' \ | |
| sudo tee /etc/systemd/system/no_wakeup_usb.service >/dev/null \ | |
&& sudo systemctl enable no_wakeup_usb.service |
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
export PATH="/home/$USER/.local/bin:$PATH" | |
export PATH="/home/$USER/apps/neovim/bin:$PATH" | |
export PATH="/home/$USER/apps/Discord:$PATH" | |
export PATH="$PATH:/home/$USER/bin/flutter/bin" | |
alias snow="systemctl poweroff" | |
alias sus="systemctl suspend" | |
alias vicon="volumeicon &" | |
alias discord="Discord" | |
alias cpwd='directory=$(pwd); echo "$directory" > /tmp/directory.txt;clear' | |
alias cpd='directory=$(cat /tmp/directory.txt); cd "$directory";clear' |
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
from selenium import webdriver | |
from selenium.webdriver.common.by import By | |
from selenium.webdriver.chrome.service import Service | |
from selenium.webdriver.chrome.options import Options | |
from selenium.webdriver.support.ui import WebDriverWait | |
from selenium.webdriver.support import expected_conditions as EC | |
import time | |
def get_page_source( |
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
from selenium import webdriver | |
from selenium.webdriver.common.by import By | |
from selenium.webdriver.chrome.service import Service | |
from selenium.webdriver.chrome.options import Options | |
from selenium.webdriver.support.ui import WebDriverWait | |
from selenium.webdriver.support import expected_conditions as EC | |
import time | |
start_time = time.time() |
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
general { | |
colors = true | |
interval = 1 | |
} | |
order += "tztime local" | |
order += "wireless _first_" | |
order += "ethernet _first_" | |
order += "battery all" | |
order += "disk /" |
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
set $mod Mod1 | |
#default_border none font pango:monospace 8 | |
exec --no-startup-id dex-autostart --autostart --environment i3 | |
exec --no-startup-id xss-lock --transfer-sleep-lock -- i3lock --nofork | |
exec --no-startup-id nm-applet | |
set $refresh_i3status killall -SIGUSR1 i3status |
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
public class Main { | |
public static void main(String[] args) { | |
IPushNotificationService notificationService = new OnesignalPushNotification(); | |
// veya | |
//IPushNotificationService notificationService = new FirebasePushNotification(); | |
notificationService.sendNotificationToSingleUser("Hello", "123456"); | |
notificationService.sendNotificationToAllUsers("Hello world"); | |
//... |
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
public class FirebasePushNotification implements IPushNotificationService { | |
public boolean sendNotificationToSingleUser(String data, String clientId) { | |
//işlemler | |
} | |
public boolean sendNotificationToAllUsers(String data) { | |
//işlemler | |
} | |
} |
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
public class OnesignalPushNotification implements IPushNotificationService { | |
public boolean sendNotificationToSingleUser(String data, String clientId) { | |
//işlemler | |
} | |
public boolean sendNotificationToAllUsers(String data) { | |
//işlemler | |
} | |
} |
NewerOlder