Skip to content

Instantly share code, notes, and snippets.

subscription.canceled (cancel now)

{
    "data": {
        "id": "sub_01hy89z6jbcvkhvj0jgx6kr7cq",
        "items": [
            {
                "price": {
@alyatwa
alyatwa / good array.md
Last active September 20, 2023 16:13
good array

Good Array Bob doesn't like character arrays having same consecutive character, so he calls them bad arrays. A good array is the one which does not have any same consecutive letters. You are given a character array, make it a good array. The only allowed operation is: If there are two same consecutive letters, delete one of them. INPUT The first line contains an integer T, denoting the number of test cases. Each test case contain an character array. OUTPUT For each test case, print the answer to the given problem. CONSTRAINTS 1 <= T <= 10

@alyatwa
alyatwa / unity snippets.md
Last active December 15, 2022 19:42
unity snippets

GetCurrentMousePosition GetCurrentMousePosition().GetValueOrDefault();

    private Vector3? GetCurrentMousePosition()
    {
        var ray = Camera.main.ScreenPointToRay(Input.mousePosition);
        var plane = new Plane(Vector3.forward, Vector3.zero);

 float rayDistance;
@alyatwa
alyatwa / blender.md
Last active December 26, 2022 23:57
blender

Import material from anther blender file

  • File
  • Append
  • Select blender file.blend
  • material

Render Region

by using the Ctrl+B shortcut, once again clicking and holding the left mouse button and dragging the rectangle to create the region.

@alyatwa
alyatwa / frida-okhttp3.js
Last active March 16, 2021 01:07 — forked from tiiime/frida-okhttp3.js
frrida log okhttp request
// frida -U ${package} -l request.js
Java.perform(function () {
var OkHttpClient = Java.use("okhttp3.OkHttpClient");
var RealCall = Java.use("okhttp3.RealCall");
OkHttpClient.newCall.implementation = function (request) {
var result = this.newCall(request)
console.log(request.toString())
return result
@alyatwa
alyatwa / install android sdk tool offline.md
Last active February 15, 2022 04:10
install sdk android offline for windows

main tutorial: https://reactnative.dev/docs/environment-setup

Install Android SDK Platform Tools

tutorial: https://androidsdkoffline.blogspot.com/p/android-sdk-platform-tools.html

  1. download platform-29 -->> https://dl.google.com/android/repository/platform-29_r04.zip
  2. using bash cmd >> start with: cd $ANDROID_SDK_ROOT
    rm -rf platforms/android-29 && unzip /f/react/platform-29_r04.zip -d platforms/android-29 && cd platforms/android-29 && mv android-*/* . && rm -rf android-*

Install Android SDK Build Tools

@alyatwa
alyatwa / Component.jsx
Created April 5, 2020 16:27 — forked from krambertech/Component.jsx
ReactJS: Input fire onChange when user stopped typing (or pressed Enter key)
import React, { Component } from 'react';
import TextField from 'components/base/TextField';
const WAIT_INTERVAL = 1000;
const ENTER_KEY = 13;
export default class TextSearch extends Component {
constructor(props) {
super();