Skip to content

Instantly share code, notes, and snippets.

@isacan
isacan / test
Created September 1, 2020 13:05
curl --location --request POST 'http://mobilapiv2.milliyet.com.tr/api/milliyet/query' \
--header 'Content-Type: application/json' \
--data-raw '{"query":" query getSuperContentByUrl($id: String!)\n {\n Content(Id:$id){\n Redirect,\n AssetId,\n IId,\n Id,\n Ancestors{\n IxName\n },\n Relations{\n \tDescription,\n \tModifiedDate,\n \tUrl,\n \tId,\n \t\tFiles{\n FileName,\n Url,\n ContentType,\n ModifiedDate\n }\n },\n Properties{\n IxName,\n Name,\n Value,\n SelectValues(Status:true){\n Value\n }\n },\n Writers{\n SelfPath,\n FullName,\n Files{\n FileName,\n Url,\n ContentType\n },\n SocialTags{\n Type,\n Tag\n }\n },\n\n Writer{\n
@isacan
isacan / test3
Last active July 14, 2020 14:07
{"success":true,"code":200,"data":[{"id":495237178,"project_id":943,"application_id":4285,"campaign_id":28527234,"trigger_id":309203598,"message_type":2,"send_mode":1,"type":"android","environment":"production","target_count":29,"sent_count":28,"processing_count":0,"error_count":1,"delivery_count":28,"open_count":1,"click_count":1,"runtime":0,"error":0,"error_message":null,"status":1,"create_time":1594647478,"expiration_time":1597066678,"collapse_key":null,"webhook_delivery":null,"webhook_open":null,"message":{"contentId":"5d19b630ec10bb255c6e7e4b","articletType":"NewsPhotoGallery","":"","id":"495237178","cid":"28527234","xpush":"yes","title":"Deneme","alert":"Deneme","sound":""}},{"id":495242966,"project_id":943,"application_id":4285,"campaign_id":28528848,"trigger_id":309206138,"message_type":2,"send_mode":1,"type":"android","environment":"production","target_count":28,"sent_count":28,"processing_count":0,"error_count":0,"delivery_count":28,"open_count":0,"click_count":0,"runtime":0,"error":0,"error_message
@isacan
isacan / test
Created February 19, 2020 11:11
{
"meta": {
"metaType": "SUCCESS",
"status": 200
},
"data": {
"contentType": "Author",
"url": "/yazarlar/ugur-cebeci/ucakta-cinli-var-mi-41450344",
"template": {
"ixName": "AppStandardTemplate",
@isacan
isacan / TinyDB.kt
Created April 16, 2019 12:30
Tiny SharedPreferences Manager
import android.content.Context
import android.content.SharedPreferences
import android.text.TextUtils
import android.graphics.Bitmap.CompressFormat
import android.graphics.Bitmap
import android.graphics.BitmapFactory
import android.os.Environment
import android.preference.PreferenceManager
import android.util.Log
import com.google.gson.Gson
@isacan
isacan / Solution.kt
Created February 5, 2019 19:46
Solution for Circular Array Rotation with Kotlin
class Solution {
private val scanner = Scanner(System.`in`)
// Complete the circularArrayRotation function below.
private fun circularArrayRotation(a: IntArray, k: Int, queries: IntArray): IntArray {
//Rotation not 0 and array length must be high from one
if (k == 0 || a.size < 2) {
return IntArray(0)
@isacan
isacan / Solution.java
Last active February 5, 2019 19:38
Solution for Circular Array Rotation with Java
import java.io.*;
import java.math.*;
import java.security.*;
import java.text.*;
import java.util.*;
import java.util.concurrent.*;
import java.util.regex.*;
public class Solution {
{ "data": {
    "type": "product",
    "productTitle": "Complete your order",
    "productDescription": "Livebox 4",
    "productImageUrl": "http://dcommerce-demo.telaura.com/ecomm/media/1502172497229_livebox.png",
    "productOfferId": 1035
  },
  "to" : "e1C_ql4JA1U:APA91bG47VOIO4ZkNsZDJNLATxfyhtW6YOJQ7Vzh4jVkr08W1MwcknwwGfD5L2Wf7L4C51-2PzYJfq8B4aYKqw_UQspPkHtDqyzHqdVLrHsPFlOGB4zYJnk5-uQ4Wj09HduyIqnUEVKF"
}
public class MyFirebaseInstanceIDService extends FirebaseInstanceIdService {

    private static final String TAG = "MyFirebaseIIDService";

    /**
     * Called if InstanceID token is updated. This may occur if the security of
     * the previous token had been compromised. Note that this is called when the InstanceID token
     * is initially generated so this is where you would retrieve the token.
     */
public class MyFirebaseMessagingService extends FirebaseMessagingService {

    private static final String TAG = "MyFirebaseMsgService";

    /**
     * Called when message is received.
     *
     * @param remoteMessage Object representing the message received from Firebase Cloud Messaging.
     */
@isacan
isacan / gist:103800a7bd291f6b8bd7
Created December 2, 2015 06:54 — forked from orhanobut/gist:8665372
Up down animation for dialog fragment
// Slide up animation
<?xml version="1.0" encoding="utf-8"?> <set xmlns:android="http://schemas.android.com/apk/res/android" >
<translate
android:duration="@android:integer/config_mediumAnimTime"
android:fromYDelta="100%"
android:interpolator="@android:anim/accelerate_interpolator"
android:toXDelta="0" />