Skip to content

Instantly share code, notes, and snippets.

View safaorhan's full-sized avatar
👋
Hey.

Safa Orhan safaorhan

👋
Hey.
View GitHub Profile
<?xml version="1.0" encoding="utf-8"?>
<resources>
<integer name="weight_light">300</integer>
<integer name="weight_regular">400</integer>
<integer name="weight_semi_bold">600</integer>
<integer name="weight_bold">700</integer>
<integer name="weight_extra_bold">800</integer>
</resources>
@safaorhan
safaorhan / .bash_profile
Last active December 22, 2017 15:09
Connects to first available android device. Useful if you make an alias.
alias adbc="source ~/.bash_profile && adb -s $(adb devices | grep -E -e '^(.+)\s+device$' -o | grep -E -o -e '(.*)\s') shell"
@safaorhan
safaorhan / pre-request.js
Last active March 22, 2018 13:02
POST /customers
var firstName = getRandomFirstName();
var lastName = getRandomLastName();
var uniqueEmail = getUniqueEmail();
/*
* Generate random names and email address
* and save them into the environment variables.
* So that we can use the values in the request body.
*/
@safaorhan
safaorhan / test.js
Created March 22, 2018 13:05
GET /customer
//status code is 200
pm.test("Status code is 200", function () {
pm.response.to.have.status(200);
});
//reponse body is json()
pm.test("Response body should be json",function(){
pm.response.to.have.jsonBody();
})
@safaorhan
safaorhan / FrequentLetterGenerator.java
Created June 10, 2018 03:12
Random english letter generator according to their frequencies in English.
package com.safaorhan.example;
public class FrequentLetterGenerator {
private static char[] letters = "ABCDEFGHIJKLMNOPQRSTUVWXYZ".toCharArray();
private static float[] weights = new float[]{
8.167f,
1.492f,
2.782f,
4.253f,
12.702f,
@safaorhan
safaorhan / dict-tr-TR.txt
Created June 14, 2018 11:13
Turkish word list, with circumflexes removed. This dictionary is extracted from aspell.
This file has been truncated, but you can view the full file.
o
aba
abu
ebe
oba
obua
ibibiği
ibibik
ebabil
@safaorhan
safaorhan / mail-settings.md
Created June 21, 2018 21:47
Yandex pop3 and smtp settings for custom domains

Incoming mail

user name — [email protected]
mail server address — pop.yandex.com
connection security — SSL
port — 995

Outgoing mail

@safaorhan
safaorhan / viewPagerHack.kt
Last active October 18, 2019 13:10
Disables the child attach listener so that inflated children with wrap_content heights can pass.
/**
* Disables the child attach listener so that inflated children with wrap_content heights can pass.
*
* This is very fragile and depends on the implementation details of [ViewPager2].
*
* @see ViewPager2.enforceChildFillListener (the removed listener)
*/
private fun ViewPager2.removeMatchParentCheckForChildren() {
(getChildAt(0) as RecyclerView).clearOnChildAttachStateChangeListeners()
}
@safaorhan
safaorhan / ViewPager2Hack.kt
Created February 11, 2020 13:45
Disables the child attach listener so that inflated children with wrap_content heights can pass.
/**
* Disables the child attach listener so that inflated children with wrap_content heights can pass.
*
* This is very fragile and depends on the implementation details of [ViewPager2].
*
* @see ViewPager2.enforceChildFillListener (the removed listener)
*/
private fun ViewPager2.hackMatchParentCheckInViewPager() {
(getChildAt(0) as RecyclerView).clearOnChildAttachStateChangeListeners()
}
Job brief
We are looking for an Android Developer who possesses a passion for pushing mobile technologies to the limits. This Android app developer will work with our team of talented engineers to design and build the next generation of our mobile applications. Android programming works closely with other app development and technical teams.
Responsibilities
Design and build advanced applications for the Android platform
Collaborate with cross-functional teams to define, design, and ship new features
Work with outside data sources and APIs
Unit-test code for robustness, including edge cases, usability, and general reliability
Work on bug fixing and improving application performance
Continuously discover, evaluate, and implement new technologies to maximize development efficiency