Skip to content

Instantly share code, notes, and snippets.

View ousenko's full-sized avatar

Drew ousenko

View GitHub Profile
@ousenko
ousenko / RxScanner
Last active December 18, 2017 07:45
Rx Wrapper around Bluetooth Low Energy scan process
import android.bluetooth.BluetoothAdapter;
import android.bluetooth.BluetoothDevice;
import android.text.TextUtils;
import rx.Observable;
import rx.Subscriber;
import rx.android.schedulers.AndroidSchedulers;
import rx.functions.Action0;
import rx.schedulers.Schedulers;
@ousenko
ousenko / version.gradle
Last active September 4, 2018 14:09
Android versioning based on git tags
/**
* This gradle ext script sets two variables: gitBasedVersionCode and gitBasedVersionName
* These variables are derived from Git history, assuming you use git tags to mark your (micro-)releases
*
* Using this scheme is a convenient way to automatically derive versions for you application artifacts.
* To begin with it, just set an annotated tag like: `git tag -a 0.1 -m "some artifact version" `
*
**/
ext {
@ousenko
ousenko / disable.sh
Created October 8, 2018 14:04
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

Uninstall brew package and dependencies

Remove package's dependencies (does not remove package):

brew deps [FORMULA] | xargs brew remove --ignore-dependencies

Remove package:

@ousenko
ousenko / things-i-believe.md
Created February 11, 2020 21:41 — forked from stettix/things-i-believe.md
Things I believe

Things I believe

This is a collection of the things I believe about software development. I have worked for years building backend and data processing systems, so read the below within that context.

Agree? Disagree? Feel free to let me know at @JanStette. See also my blog at www.janvsmachine.net.

Fundamentals

Keep it simple, stupid. You ain't gonna need it.