Skip to content

Instantly share code, notes, and snippets.

View tolunayozturk's full-sized avatar

Tolunay Öztürk tolunayozturk

  • Software Engineer @Huawei
  • Istanbul, Turkey
  • 12:52 (UTC +03:00)
View GitHub Profile
@tolunayozturk
tolunayozturk / driveSignIn.java
Last active September 15, 2020 13:03
HUAWEI Drive Kit Sign In
private void driveSignIn() {
List<Scope> scopeList = new ArrayList<>();
scopeList.add(new Scope(DriveScopes.SCOPE_DRIVE));
scopeList.add(new Scope(DriveScopes.SCOPE_DRIVE_APPDATA));
scopeList.add(new Scope(DriveScopes.SCOPE_DRIVE_FILE));
scopeList.add(new Scope(DriveScopes.SCOPE_DRIVE_METADATA));
scopeList.add(new Scope(DriveScopes.SCOPE_DRIVE_METADATA_READONLY));
scopeList.add(new Scope(DriveScopes.SCOPE_DRIVE_READONLY));
scopeList.add(HuaweiIdAuthAPIManager.HUAWEIID_BASE_SCOPE);
@tolunayozturk
tolunayozturk / VSCodeNautilusExt.py
Last active January 19, 2022 20:06
"Open in VSCode" extension for Nautilus
# -*- coding: latin-1 -*-
# Copy this python script under ~/.local/share/nautilus-python/extensions and restart nautilus.
# You may need to create nautilus-python and extensions folders if they do not exist. –
import os
import gi
gi.require_version('Nautilus', '3.0')
from gi.repository import Nautilus, GObject
@tolunayozturk
tolunayozturk / changeaccel.py
Last active May 8, 2018 11:22
Auto set "Device Accel Constant Deceleration" to a usable level for A4TECH G3-200N Wireless Mice when connected
#!/usr/bin/python3
import subprocess
import pyudev
import time
deceleration = -0.3
# bionic = 'libinput Accel Speed' [-1,1]
# xenial = 'Device Accel Constant Deceleration'
context = pyudev.Context()