Skip to content

Instantly share code, notes, and snippets.

View tomleejumah's full-sized avatar
💭
Reject humanity return to monke

. tomleejumah

💭
Reject humanity return to monke
View GitHub Profile
import re
import requests
import sys
import os
from os import path
try:
import sty
from sty import fg, bg, ef, rs
@tomleejumah
tomleejumah / gist:46ee8175c57820616dd390f346df7636
Created March 14, 2025 07:10
Hiding system navigation bar in react native
import React, { useEffect } from 'react';
import { View, Text, StyleSheet } from 'react-native';
import * as NavigationBar from 'expo-navigation-bar';
const App = () => {
useEffect(() => {
// Hide the navigation bar
NavigationBar.setVisibilityAsync('hidden');
// Set the behavior to 'overlay-swipe'
NavigationBar.setBehaviorAsync('overlay-swipe');
class FacebookAuthHelper(private val activity: Activity) {
private val auth: FirebaseAuth = FirebaseAuth.getInstance()
private val callbackManager: CallbackManager = CallbackManager.Factory.create()
init {
// Initialize Facebook SDK if not already initialized
if (!FacebookSdk.isInitialized()) {
FacebookSdk.sdkInitialize(activity.applicationContext)
}
}
<?xml version="1.0" encoding="utf-8"?>
<androidx.drawerlayout.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/transparent"
tools:openDrawer="start"
android:id="@+id/drawer_layout"
tools:context=".activities.HomeActivity">
@tomleejumah
tomleejumah / README.md
Created June 28, 2024 13:35 — forked from lopspower/README.md
Hexadecimal color code for transparency

Hexadecimal color code for transparency

Twitter

How to set transparency with hex value ?

For example, you want to set 40% alpha transparence to #000000 (black color), you need to add 66 like this #66000000.

Download This sample on Google Play Store

package com.ipaulpro.afilechooser.utils;
import android.content.ContentResolver;
import android.content.ContentUris;
import android.content.Context;
import android.content.Intent;
import android.database.Cursor;
import android.database.DatabaseUtils;
import android.graphics.Bitmap;
import android.net.Uri;
package com.leeStream.Sporty.Adapter;
import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.os.Handler;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
@tomleejumah
tomleejumah / AndroidManifest.xml
Created October 20, 2023 13:07
Notifications Tutorial Part 1
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.codinginflow.notificationsexample">
<application
android:name=".App"
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
@tomleejumah
tomleejumah / Viaplay.cs
Created June 25, 2023 22:07 — forked from faejr/Viaplay.cs
Interfacing with viaplay content api
using System;
using System.Net;
using Nimble.JSON;
using System.Text.RegularExpressions;
using System.Collections.Generic;
namespace Viaplay
{
public class Viaplay
{
@tomleejumah
tomleejumah / gist:c47ebcc36a09459bd8decd8bb09175f6
Created June 18, 2023 09:50
error getting while trying to add github dependancies on my project
FAILURE: Build completed with 9 failures.
1: Task failed with an exception.
-----------
* What went wrong:
Execution failed for task ':app:checkDebugAarMetadata'.
> Could not resolve all files for configuration ':app:debugRuntimeClasspath'.
> Could not find com.theartofdev.edmodo:android-image-cropper:2.8.0.
Searched in the following locations:
- https://dl.google.com/dl/android/maven2/com/theartofdev/edmodo/android-image-cropper/2.8.0/android-image-cropper-2.8.0.pom