Skip to content

Instantly share code, notes, and snippets.

View ponimas's full-sized avatar
😯
___

Alexander Ponimaskin ponimas

😯
___
View GitHub Profile
@ponimas
ponimas / org.eclipse.jdt.core.prefs
Created September 21, 2023 12:15 — forked from fbricon/org.eclipse.jdt.core.prefs
formatter settings under .settings/org.eclipse.jdt.core.prefs
org.eclipse.jdt.core.formatter.align_fields_grouping_blank_lines=2147483647
org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
org.eclipse.jdt.core.formatter.alignment_for_assignment=0
org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
@ponimas
ponimas / install-kde-neon-on-ubuntu-2004.bash
Created November 7, 2021 21:27 — forked from tmarkettos/install-kde-neon-on-ubuntu-2004.bash
Install KDE Neon on top of vanilla Ubuntu 20.04
#!/bin/bash
# SPDX-License-Identifier: BSD-2-Clause
# SPDX-FileCopyrightText: 2020 Theo Markettos <git@markettos.org.uk>
# Script to install KDE Neon on top of Ubuntu 20.04
#
# The KDE Neon site says "A web search should quickly give you relevant information on how to do this. "
# but I didn't find any, so worked it out from first principles
@ponimas
ponimas / disable.sh
Created July 25, 2019 15:15
Disable bunch of #$!@ in Sierra (Version 2.1)
#!/bin/bash
# IMPORTANT: You will need to disable SIP aka Rootless in order to fully execute this script, you can reenable it after.
# WARNING: It might disable things that you may not like. Please double check the services in the TODISABLE vars.
# Get active services: launchctl list | grep -v "\-\t0"
# Find a service: grep -lR [service] /System/Library/Launch* /Library/Launch* ~/Library/LaunchAgents
# Agents to disable
TODISABLE=('com.apple.security.keychainsyncingoveridsproxy' 'com.apple.personad' 'com.apple.passd' 'com.apple.screensharing.MessagesAgent' 'com.apple.CommCenter-osx' 'com.apple.Maps.mapspushd' 'com.apple.Maps.pushdaemon' 'com.apple.photoanalysisd' 'com.apple.telephonyutilities.callservicesd' 'com.apple.AirPlayUIAgent' 'com.apple.AirPortBaseStationAgent' 'com.apple.CalendarAgent' 'com.apple.DictationIM' 'com.apple.iCloudUserNotifications' 'com.apple.familycircled' 'com.apple.familycontrols.useragent' 'com.apple.familynotificationd' 'com.apple.gamed' 'com.apple.icloud.findmydeviced.findmydevi
@ponimas
ponimas / mojave.sh
Last active August 17, 2023 17:02
disable unnecessary mojave services
# Disable / Enable Dashboard
# Settings / Mission control / Dashboard (selector) - Off
# or
# completely disable:
defaults write com.apple.dashboard mcx-disabled -boolean YES; killall Dock
# enable again:
#defaults write com.apple.dashboard mcx-disabled -boolean NO; killall Dock
defaults write NSGlobalDomain NSAutomaticWindowAnimationsEnabled -bool false
defaults write NSGlobalDomain NSWindowResizeTime -float 0.001
[Unit]
Description=xhost for xkeysnail
[Service]
Environment="DISPLAY=:0"
ExecStart=/usr/bin/xhost +SI:localuser:root
Type=oneshot
[Unit]
Description=xkeysnail
[Service]
Environment="DISPLAY=:0" "PYTHONPATH=/home/ponimas/.local/lib/python3.6/site-packages/"
ExecStartPre=/usr/bin/sudo -u ponimas /usr/bin/xhost +SI:localuser:root
Type=simple
ExecStart=/home/ponimas/.local/bin/xkeysnail --watch /home/ponimas/.config/xkeysnail.py
ExecStop=/bin/kill -TERM $MAINPID
Restart=always
# -*- coding: utf-8 -*-
import re
from copy import copy
from xkeysnail.transform import *
# [Global modemap] Change modifier keys as in xmodmap
define_modmap({Key.CAPSLOCK: Key.LEFT_CTRL})
# [Conditional modmap] Change modifier keys in certain applications
@ponimas
ponimas / a2dp.py
Last active November 8, 2019 15:56 — forked from pylover/a2dp.py
Fixing bluetooth stereo headphone/headset problem in ubuntu 16.04, 16.10 and also debian jessie, with bluez5.
#! /usr/bin/env python3.5
"""
Fixing bluetooth stereo headphone/headset problem in ubuntu 16.04 and also debian jessie, with bluez5.
Workaround for bug: https://bugs.launchpad.net/ubuntu/+source/indicator-sound/+bug/1577197
Run it with python3.5 or higher after pairing/connecting the bluetooth stereo headphone.
This will be only fixes the bluez5 problem mentioned above .
@ponimas
ponimas / docker-compose.yml
Created May 8, 2018 05:47
HOSTIP env var should be defined
#HOSTIP=your.ip.addr.ess docker-compose up
version: '3.2'
services:
consul:
image: consul
ports:
- "8500:8500"
environment:
- SERVICE_8500_IGNORE=true
import exonum.transactions as tx
import exonum.datatypes as exonum
transactions = tx.transactions(service_id=128)
@transactions
class Create(metaclass=exonum.EncodingStruct):
data_hash = exonum.Hash
author_name = exonum.Str