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)
View ts3server.service
# put in /etc/systemd/system directory
Description=TeamSpeak 3 Server
View GCC Alternatives
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 / Recovery RW Mount
Created Jun 22, 2016
Mounting partition in R/W mode in Ubuntu Recovery root shell
View Recovery RW Mount
mount -o remount,rw /
ozen / Selenium PhantomJS Python
Last active Sep 8, 2020
How to set request headers when using Selenium Python with PhantomJS driver
View Selenium PhantomJS Python
from selenium import webdriver
from selenium.webdriver import DesiredCapabilities
desired_capabilities = DesiredCapabilities.PHANTOMJS.copy()
desired_capabilities[''] = '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)
View TeamSpeak Upstart Script
# description "Start and stop the TS server"
console log
exec start-stop-daemon -S --chuid yigit -x /opt/teamspeak3/ dbplugin=ts3db_mysql
start on runlevel [2345] and started mysql
stop on runlevel [^2345]
View json color codes
"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],
View Ubuntu Locale Fix
#!/usr/bin/env bash
locale-gen en_US en_US.UTF-8 tr_TR tr_TR.UTF-8
dpkg-reconfigure locales
ozen / DeathAdder Speed Ubuntu
Last active Apr 29, 2017
Mouse Speed at Linux
View DeathAdder Speed Ubuntu
#!/usr/bin/env bash
xinput --set-prop "Razer Razer DeathAdder" "Device Accel Constant Deceleration" 2
You can’t perform that action at this time.