Skip to content

Instantly share code, notes, and snippets.

# -*- coding: utf-8 -*-
from albertv0 import *
import urllib.request
from urllib.error import URLError
import re
__iid__ = "PythonInterface/v0.1"
__prettyname__ = "XE"
__version__ = "0.0.1"
__trigger__ = "xe "
import os
import random
import string
this_file = os.path.basename(__file__)
for root, dir, files in os.walk(os.path.dirname(__file__)):
for file in files:
if file != this_file:
base_name, ext = os.path.splitext(file)
# put in /etc/systemd/system directory
[Unit]
Description=TeamSpeak 3 Server
After=network.target
[Service]
WorkingDirectory=/opt/teamspeak3
User=yigit
Group=yigit
update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.8 10
update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-5 20
update-alternatives --config gcc
@ozen
ozen / Recovery RW Mount
Created June 22, 2016 12:04
Mounting partition in R/W mode in Ubuntu Recovery root shell
mount -o remount,rw /
@ozen
ozen / Selenium PhantomJS Python Header.py
Last active September 6, 2021 05:12
How to set request headers when using Selenium Python with PhantomJS driver
from selenium import webdriver
from selenium.webdriver import DesiredCapabilities
desired_capabilities = DesiredCapabilities.PHANTOMJS.copy()
desired_capabilities['phantomjs.page.customHeaders.User-Agent'] = 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_1) ' \
'AppleWebKit/537.36 (KHTML, like Gecko) ' \
'Chrome/39.0.2171.95 Safari/537.36'
driver = webdriver.PhantomJS(desired_capabilities=desired_capabilities)
# description "Start and stop the TS server"
console log
exec start-stop-daemon -S --chuid yigit -x /opt/teamspeak3/ts3server_minimal_runscript.sh dbplugin=ts3db_mysql
start on runlevel [2345] and started mysql
stop on runlevel [^2345]
respawn
[{
"rgb": [93, 138, 168],
"lab": [55.41192892871888, -7.127665665440985, -20.662310657392567],
"label": "Air Force blue"
}, {
"rgb": [240, 248, 255],
"lab": [97.17890760827636, -1.3430979525985154, -4.273119139608905],
"label": "Alice blue"
}, {
"rgb": [227, 38, 54],
#!/usr/bin/env bash
locale-gen en_US en_US.UTF-8 tr_TR tr_TR.UTF-8
dpkg-reconfigure locales
@ozen
ozen / DeathAdder Speed Ubuntu
Last active April 29, 2017 23:50
Mouse Speed at Linux
#!/usr/bin/env bash
xinput --set-prop "Razer Razer DeathAdder" "Device Accel Constant Deceleration" 2