Skip to content

Instantly share code, notes, and snippets.

View SaBenBurra's full-sized avatar

Buğra SaBenBurra

  • Mersin, Turkey
View GitHub Profile
@SaBenBurra
SaBenBurra / .bashrc
Created February 17, 2024 07:58
custom part of my .bashrc
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'
@SaBenBurra
SaBenBurra / get_page_source.py
Last active September 2, 2023 20:42
web scraping with selenium faster
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(
@SaBenBurra
SaBenBurra / selenium_optimized_scraper.py
Created September 2, 2023 12:01
web scraping with selenium faster
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()
@SaBenBurra
SaBenBurra / i3statusconfig
Last active September 2, 2023 12:02
my i3status config file
general {
colors = true
interval = 1
}
order += "tztime local"
order += "wireless _first_"
order += "ethernet _first_"
order += "battery all"
order += "disk /"
@SaBenBurra
SaBenBurra / i3config
Last active February 25, 2024 14:03
my i3wm config file
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
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");
//...
public class FirebasePushNotification implements IPushNotificationService {
public boolean sendNotificationToSingleUser(String data, String clientId) {
//işlemler
}
public boolean sendNotificationToAllUsers(String data) {
//işlemler
}
}
public class OnesignalPushNotification implements IPushNotificationService {
public boolean sendNotificationToSingleUser(String data, String clientId) {
//işlemler
}
public boolean sendNotificationToAllUsers(String data) {
//işlemler
}
}
public interface IPushNotificationService {
public boolean sendNotificationToSingleUser(String data, String clientId);
public boolean sendNotificationToAllUsers(String data);
}
public class Main {
public static void main(String[] args) {
FirebasePushNotification notificationService = new FirebasePushNotification();
notificationService.sendNotificationToSingleUser("Hello", "123456");
notificationService.sendNotificationToAllUsers("Hello world");
//...
notificationService.sendNotificationToSingleUser("Hello", "123456");
notificationService.sendNotificationToAllUsers("Hello world");