Skip to content

Instantly share code, notes, and snippets.

View st235's full-sized avatar
🤖
Android SWE, Beep Boop Bop

Alex Dadukin st235

🤖
Android SWE, Beep Boop Bop
View GitHub Profile
@st235
st235 / RxSchedulers.java
Created August 28, 2017 11:03
Schedulers
import io.reactivex.CompletableTransformer;
import io.reactivex.FlowableTransformer;
import io.reactivex.ObservableTransformer;
import io.reactivex.Scheduler;
import io.reactivex.SingleTransformer;
/**
* Created by alexander on 07/07/2017.
*/
@st235
st235 / lint.xml
Created August 31, 2017 13:01
Room lint config
<?xml version="1.0" encoding="UTF-8"?>
<lint>
<issue id="RestrictedApi">
<ignore regexp=".*/.*_Impl.*" />
</issue>
</lint>
@st235
st235 / remove_postgres_on_mac_os.md
Created October 1, 2017 10:16 — forked from Atlas7/remove_postgres_on_mac_os.md
Note - How completely uninstall PostgreSQL 9.X on Mac OSX

This blog post has helped me clean up my postgres development environment on Mac. So making a copy!

How completely uninstall PostgreSQL 9.X on Mac OSX

This article is referenced from stackoverflow:

If installed PostgreSQL with homebrew , enter brew uninstall postgresql

If you used the EnterpriseDB installer , follow the following step.
@st235
st235 / LongestCommonSubsequence.cs
Created November 19, 2017 14:01 — forked from riyadparvez/LongestCommonSubsequence.cs
Length of longest common subsequence in C#
private static int Max(int int1, int int2)
{
return int1 > int2 ? int1 : int2;
}
public static int LongestCommonSubsequence(string str1, string str2)
{
int [,] arr = new int [str1.Length+1, str2.Length+1];
for(int i=0; i<=str2.Length; i++)

Objective-C Coding Convention and Best Practices

Most of these guidelines are to match Apple's documentation and community-accepted best practices. Some are derived some personal preference. This document aims to set a standard way of doing things so everyone can do things the same way. If there is something you are not particularly fond of, it is encouraged to do it anyway to be consistent with everyone else.

This document is mainly targeted toward iOS development, but definitely applies to Mac as well.

Operators

NSString *foo = @"bar";
language: android
jdk: oraclejdk8
sudo: false
notifications:
email:
- st235@yandex.ru
env:
matrix:
100% — FF
95% — F2
90% — E6
85% — D9
80% — CC
75% — BF
70% — B3
65% — A6
60% — 99
55% — 8C
package com.github.st235;
import org.junit.Assert;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.Parameterized;
import java.util.Arrays;
import java.util.Collection;
@st235
st235 / on-jsx.markdown
Created June 7, 2018 21:16 — forked from chantastic/on-jsx.markdown
JSX, a year in

Hi Nicholas,

I saw you tweet about JSX yesterday. It seemed like the discussion devolved pretty quickly but I wanted to share our experience over the last year. I understand your concerns. I've made similar remarks about JSX. When we started using it Planning Center, I led the charge to write React without it. I don't imagine I'd have much to say that you haven't considered but, if it's helpful, here's a pattern that changed my opinion:

The idea that "React is the V in MVC" is disingenuous. It's a good pitch but, for many of us, it feels like in invitation to repeat our history of coupled views. In practice, React is the V and the C. Dan Abramov describes the division as Smart and Dumb Components. At our office, we call them stateless and container components (view-controllers if we're Flux). The idea is pretty simple: components can't

@st235
st235 / gh-pages-deploy.md
Created June 16, 2018 19:54 — forked from cobyism/gh-pages-deploy.md
Deploy to `gh-pages` from a `dist` folder on the master branch. Useful for use with [yeoman](http://yeoman.io).

Deploying a subfolder to GitHub Pages

Sometimes you want to have a subdirectory on the master branch be the root directory of a repository’s gh-pages branch. This is useful for things like sites developed with Yeoman, or if you have a Jekyll site contained in the master branch alongside the rest of your code.

For the sake of this example, let’s pretend the subfolder containing your site is named dist.

Step 1

Remove the dist directory from the project’s .gitignore file (it’s ignored by default by Yeoman).