Skip to content

Instantly share code, notes, and snippets.

View farukcankaya's full-sized avatar

Faruk Cankaya farukcankaya

View GitHub Profile
@farukcankaya
farukcankaya / send_push.md
Last active January 11, 2017 13:11
Sending Push Notification over FCM via REST
@farukcankaya
farukcankaya / RoundedColoredCornerTransformation.java
Created February 20, 2017 09:15
A Glide Transformation to create colored rounded border
/**
* Created by farukcankaya on 17/02/2017.
* powered: https://github.com/bumptech/glide/wiki/Transformations#bitmap-re-use
*/
public class RoundedColoredCornerTransformation implements Transformation<Bitmap> {
private Context mContext;
private BitmapPool mBitmapPool;
private int mRadius;
private int mMargin;
@farukcankaya
farukcankaya / FlingBehavior.java
Last active April 19, 2017 11:23
Smooth Coordinatorlayout Scrolling, FlingBehavior
public final class FlingBehavior extends AppBarLayout.Behavior {
private static final int TOP_CHILD_FLING_THRESHOLD = 3;
private boolean isPositive;
public FlingBehavior() {
}
public FlingBehavior(Context context, AttributeSet attrs) {
super(context, attrs);
}
apply plugin: 'maven'
def groupId = project.PUBLISH_GROUP_ID
def artifactId = project.PUBLISH_ARTIFACT_ID
def version = project.PUBLISH_VERSION
def localReleaseDest = "${buildDir}/release/${version}"
task androidJavadocs(type: Javadoc) {
failOnError = false
@farukcankaya
farukcankaya / rule_builder.rb
Created August 15, 2017 05:55
Rule Builder
rule = Rule.find_by_id(rule_id)
if rule
worker_ids = rule.workers_relation.pluck(:id)
rule.last_synched_at = Time.zone.now
rule.worker_ids = worker_ids
rule.workers_count = worker_ids.length
rule.save
# Re-Calculate later
{
"identity_type": "tckn",
"data": {
"ssn": "48431355342",
"is_citizen": "true",
"first_name ": "FARUK",
"last_name ": "CANKAYA",
"birth_date": "11/01/1993"
}
}
Alessi Davide: 16, Angerer Timo: 16, Atropat Berke: 16, Bauer Florian: 16, Baumann Maximilian: 16, Botos Arpad: 16, Cankaya Faruk: 16, Cervieri Carrau Valentin: 16, Chen Junpeng: 16, Cimen Bilge: 16, Coffey Aubrey: 16, Coutinho Manuel: 16, Dalkilic Sinem: 16, Danner Katharina: 16, Derkacz-Bogner Daniel: 16, Eberhard Eike: 16, Egawa Mayumi: 16, Ehrenstorfer Florian: 16, Elfering Felix: 16, Flesch Lukas: 16, Frank Fabian: 16, Frings Andreas: 16, Fritsch Jonas: 16, Fuchsloch Leonardo: 16, Fuest Johannes: 16, Gankin Dennis: 16, Gedik Erenay: 16, Germes Tanae: 16, Ginter Pascal: 16, Gräßle Sarah: 16, Gu Yiyu: 16, Guan Haowen: 16, Guerrero Gutierrez Victor Hugo: 16, Gültekin Bora: 16, Guo Mingxiao: 16, Hakobyan Astghik: 16, Hamdy Hoda: 16, Harlander Julia: 16, Hekim David: 16, Hlubek Kamil: 16, Holzner Andreas: 16, Hontheim Henning: 16, Huber Lukas: 16, Hug Michael: 16, Iyidogan Atacan: 16, Izrailevitch Valentina: 16, Johler Marc: 16, Kaewlomsup Chitralada: 16, Kara Anil Can: 16, Karabulut Erkan: 16, Karali Fatma:
@farukcankaya
farukcankaya / submit.md
Last active June 4, 2021 18:24
AGT-2021-Final-String

HOW TO SUBMIT THE GAME

  1. The final string will be published in 3 options:
  • In 2nd row of the excel.
  • In a separate plain text viewer. The link will be published in the 3rd row.
  • In the telegram group.

Screenshot 2021-06-04 at 11 15 45

  1. Copy the final string

We recommend to copy the final string using the link in the 3rd row:

Angerer Timo: 12.7, Baumann Maximilian: 12.7, Botos Arpad: 12.7, Cankaya Faruk: 12.7, Cervieri Carrau Valentin: 12.7, Chen Junpeng: 12.7, Coffey Aubrey: 12.7, Coutinho Manuel: 12.7, Dalkilic Sinem: 12.7, Danner Katharina: 12.7, Derkacz-Bogner Daniel: 12.7, Eberhard Eike: 12.7, Egawa Mayumi: 12.7, Elfering Felix: 12.7, Flesch Lukas: 12.7, Frank Fabian: 12.7, Frings Andreas: 12.7, Fritsch Jonas: 12.7, Fuchsloch Leonardo: 12.7, Gedik Erenay: 12.7, Germes Tanae: 12.7, Ginter Pascal: 12.7, Gräßle Sarah: 12.7, Gu Yiyu: 12.7, Guan Haowen: 12.7, Guerrero Gutierrez Victor Hugo: 12.7, Gültekin Bora: 12.7, Guo Mingxiao: 12.7, Hakobyan Astghik: 12.7, Hamdy Hoda: 12.7, Harlander Julia: 12.7, Hekim David: 12.7, Hlubek Kamil: 12.7, Holzner Andreas: 12.7, Hontheim Henning: 12.7, Huber Lukas: 12.7, Hug Michael: 12.7, Iyidogan Atacan: 12.7, Izrailevitch Valentina: 12.7, Johler Marc: 12.7, Karabulut Erkan: 12.7, Karali Fatma: 12.7, Kim Hyunsung: 12.7, Kiray Mert: 12.7, Köbele Till: 12.7, Kobiella Robert: 12.7, Kolb Katharina: 1
@farukcankaya
farukcankaya / mount-s3-bucket.md
Last active January 9, 2022 12:12
Mount S3 bucket to EC2 instance via S3fs using FUSE

Mount S3 Bucket to AWS EC2 Instance

  1. [Connect][ec2-connect] to the EC2 instance.
  2. Update package manager to be able to find s3fs: sudo apt-get update
  3. Install s3fs and awscli: sudo apt install s3fs awscli -y
    which s3fs
    /usr/bin/s3fs
  4. Setup access(if you do NOT have credentials please check the [Give permission to EC2 to access S3][permission] section below ):