Skip to content

Instantly share code, notes, and snippets.

@kiok46
kiok46 / logs.txt
Created August 9, 2016 12:21
Crash report (Sysinfo android)
This file has been truncated, but you can view the full file.
--------- beginning of main
I/MtpServer(14289): sending data:
I/MtpServer(14289): sending response 2001
W/AEE ( 0): some logs have been lost (350 bytes estimated)
I/MtpServer(14289): got MTP_OPERATION_GET_OBJECT_PROP_LIST command MTP_OPERATION_GET_OBJECT_PROP_LIST, line 597
I/MtpServer(14289): GetObjectPropList handle: 0x16e, format: NONE, property: UNKNOWN, group: 0, depth: 0
D/MtpPropertyGroup(14289): getPropertyList handle: 16e, format: 0, depth: 0
W/MtpPropertyGroup(14289): getPropertyList handle: 0x16e, c.getInt(column) = 1444562702
W/MtpPropertyGroup(14289): getPropertyList handle: 0x16e, c.getInt(column) = 1444562702
I/MtpServer(14289): sending data:
--------- beginning of system
09-04 04:45:03.194 210 218 I Ext4Crypt: ext4 crypto complete called on /data
09-04 04:45:03.194 210 218 I Ext4Crypt: No master key, so not ext4enc
09-04 04:45:03.194 769 2662 I chatty : uid=1000(system) CryptdConnector expire 1 line
09-04 04:45:03.195 769 769 I chatty : uid=1000 system_server expire 1 line
09-04 04:45:03.196 769 2660 I chatty : uid=1000(system) MountService expire 129 lines
09-04 04:45:03.197 769 2661 I chatty : uid=1000(system) VoldConnector expire 1 line
09-04 04:45:03.210 769 2660 I chatty : uid=1000(system) MountService expire 367 lines
09-04 04:45:03.258 769 815 I chatty : uid=1000(system) android.bg expire 1 line
09-04 04:45:03.375 769 769 I chatty : uid=1000 system_server expire 32 lines
@kiok46
kiok46 / id_rsa_encryption.md
Created May 15, 2017 14:07
Encrypt/Decrypt a File using your SSH Public/Private Key on Mac OS X

A Guide to Encrypting Files with Mac OS X

This guide will demonstrate the steps required to encrypt and decrypt files using OpenSSL on Mac OS X. The working assumption is that by demonstrating how to encrypt a file with your own public key, you'll also be able to encrypt a file you plan to send to somebody else using their private key, though you may wish to use this approach to keep archived data safe from prying eyes.

Too Long, Didn't Read

Assuming you've already done the setup described later in this document, that id_rsa.pub.pcks8 is the public key you want to use, that id_rsa is the private key the recipient will use, and secret.txt is the data you want to transmit…

Encrypting

$ openssl rand 192 -out key

$ openssl aes-256-cbc -in secret.txt -out secret.txt.enc -pass file:key

@kiok46
kiok46 / redux_setup.md
Last active February 15, 2021 01:02
Redux, store, actions and reducers setup along with explanation.

Redux Setup

Implementation of redux inside any react.js or react-native application,

  • we will create an instance of the redux store.
  • We are going to create a provider tag from react redux library
  • Then render that provider tag passing in the store as a prop, then any child component to this provider tag will have access to this store through the context system inside of react.
  • import { Provider } from ‘react-redux’; // In main.js
  • to create a store create one in a separate folder.
@kiok46
kiok46 / Action_creaters_and_reducers.md
Last active May 10, 2021 23:17
Action Creator and reducers details and flow

Action Creators and Reducers.

why action creators? We want to minimize the responsibilities of anyone of our components, We want to make a component as simple and as dumb as possible, so all our compenent is going to do is show the UI. whenever our Component is going to do some logical work we would call the action creator.


Component -> renders the internal components -> need to do some action, let's say handle a button click
@kiok46
kiok46 / AsyncStorage.md
Created June 15, 2017 15:04
How to setup Async storage and store boolean(true/false) values.

AsyncStorage

Store information in local machine (Mobile).

import { AsyncStorage } from 'react-native';

import {
	AUTOCOMPLETE_SETTING,
	QUACK_ON_REFRESH_SETTING,
@kiok46
kiok46 / CustomTabs.md
Last active June 25, 2017 09:30
Creating CustomTabs in React-Navigation

Custom Tabs

To create Custom tabs in React-Navigation

A structure to get the idea of what we want.

StackNavigator
    - Screen
@kiok46
kiok46 / cards_with_overlaybuttons.md
Created June 27, 2017 09:53
Cool cards, with overlay buttons like in DuckDuckGo app.

Cool cards, with overlay buttons like in DuckDuckGo app.

How I designed it?

  • Make a card element (Like Material UI via google)
  • Divide it into 2 sections. (Position Relative)
    • Image
    • Source Icon and description
  • 2 Buttons (Position Absolute)
@kiok46
kiok46 / SearchHistorycards.md
Last active June 27, 2017 10:04
Search HistoryCard List like in DuckDuckGo app.

Search HistoryCard List like in DuckDuckGo app.

The card.

<Card
    marginBottomProp={0}
	backgroundColorProp={'white'}
&gt;
@kiok46
kiok46 / NoItemComponent.md
Created June 28, 2017 17:41
Display a nice Component when no Items are available to show.

NoItemComponent

Display a nice Component when no Items are available to show.

import React, { Component } from 'react';
import { Text, View, Dimensions, StyleSheet } from 'react-native';
import { FontAwesome } from '@expo/vector-icons';
import Colors from '../constants/Colors';