Skip to content

Instantly share code, notes, and snippets.

View yogithesymbian's full-sized avatar
✔️
scodeid - open source code id

Black Hat yogithesymbian

✔️
scodeid - open source code id
View GitHub Profile
@yogithesymbian
yogithesymbian / usage.winston.md
Created November 23, 2022 23:32
Utils Winston Node JS

usage

const winLogger = require('@utils/winston')

winLogger.info(`your message`)

output

// its looks like a '.let' in kotlin , awesome !, dart
extension ObjectExt<T> on T {
R let<R>(R Function(T) x) => x(this);
}
// for example
/**
* we have nested json object for example data --> user -->
*/
@yogithesymbian
yogithesymbian / main.dart
Last active June 25, 2022 05:43
dartpad
void main() {
for (int i = 0; i < 5; i++) {
print('hello ${i + 1}');
}
// test
}
@yogithesymbian
yogithesymbian / URIPathHelper.kt
Last active February 10, 2022 21:54
uri problem on document/download
import android.content.ContentUris
import android.content.Context
import android.database.Cursor
import android.net.Uri
import android.os.Build
import android.os.Environment
import android.provider.DocumentsContract
import android.provider.MediaStore
import android.util.Log
import java.lang.Exception
@yogithesymbian
yogithesymbian / URIPathHelper.kt
Created November 17, 2021 20:19
get path open file kotlin
import android.content.ContentUris
import android.content.Context
import android.database.Cursor
import android.net.Uri
import android.os.Build
import android.os.Environment
import android.provider.DocumentsContract
import android.provider.MediaStore
class URIPathHelper {
@yogithesymbian
yogithesymbian / Log message exclude android studio
Created November 11, 2021 23:21
Log Message disturb on Debug Android Studio ( Physical Device )
Filter Name : Disturb Debug Physical Device
Log Tag :
Log Message : ^(?!(processMotionEvent|dispatchPointerEvent|focused app window|processKeyEvent KeyEvent))
Package Name :
PID
Log Level : Debug
@yogithesymbian
yogithesymbian / mbpm1_report.txt
Created October 24, 2021 10:12
log mbp m1 android studio panic was restarting my mac
panic(cpu 5 caller 0xfffffe0015678af0): "FED err (L1C I-side data parity) on P-core: FAR=0x127e5dce8 FED_ERR_STS=0xf01fe00147b9d40 MMU_ERR_STS=0 ErrDet_Addr: VA=0x1fe00147b9d40"
Debugger message: panic
Memory ID: 0xff
OS release type: User
OS version: 20G165
Kernel version: Darwin Kernel Version 20.6.0: Mon Aug 30 06:12:20 PDT 2021; root:xnu-7195.141.6~3/RELEASE_ARM64_T8101
Fileset Kernelcache UUID: 6304A06696A657F4CF48CC569B129642
Kernel UUID: DA16DC13-5845-3638-9BB4-B14F9AC08E55
iBoot version: iBoot-6723.140.2
secure boot?: YES
@yogithesymbian
yogithesymbian / generate_unique_with_primary_key.sql
Created October 21, 2021 03:21
generate auto number mysql before insert with unique logic concat with primary key
DELIMITER $$
DROP TRIGGER IF EXISTS `auto_number`$$
CREATE TRIGGER `auto_number` BEFORE INSERT on users
FOR EACH ROW BEGIN
SET new.auto_number = CONCAT(new.id, LEFT(UUID(), 8));
END$$
DELIMITER ;
// https://github.com/yogithesymbian/Kotlin-Setup-Starterpackjelly-2021
// model viemodel viewmodelfacotry interface livedata
// soon will publish
// (File Header.java)
/**
* Android Studio Arctic Fox | 2020.3.1 Patch 3
* Build #AI-203.7717.56.2031.7784292, built on October 1, 2021
* Runtime version: 11.0.10+0-b96-7281165 x86_64
* VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
* macOS 11.6
@yogithesymbian
yogithesymbian / ALL_Mime_Type
Last active June 25, 2023 08:45
mime types
{
{".3gp", "video/3gpp"},
{".torrent","application/x-bittorrent"},
{".kml", "application/vnd.google-earth.kml+xml"},
{".gpx", "application/gpx+xml"},
{".csv", "application/vnd.ms-excel"},
{".apk", "application/vnd.android.package-archive"},
{".asf", "video/x-ms-asf"},
{".avi", "video/x-msvideo"},
{".bin", "application/octet-stream"},