Skip to content

Instantly share code, notes, and snippets.

View ankit1057's full-sized avatar
:octocat:
Developing

Ankit ankit1057

:octocat:
Developing
  • Dhwani Rural Information Systems
  • Gurugram, India
  • 18:12 (UTC -12:00)
  • X @ankit1057
View GitHub Profile
@ankit1057
ankit1057 / stable-diffusion-webui-termux.md
Created October 9, 2024 06:36 — forked from nviet/stable-diffusion-webui-termux.md
Install stable-diffusion-webui on Termux (Android) + PRoot

Install stable-diffusion-webui on Termux (Android) + PRoot

This will guide you on installing AUTOMATIC1111/stable-diffusion-webui on Termux (Android) + PRoot Distro. Make sure that you have a high-end phone to actually make this usable. On my phone with 8GB RAM, launch the webui alone take at least ~ 2 GB RAM, thus making it impossible to load any model and process further.

1. Prerequisites

First you have to install Termux and install PRoot. Then install and login to Ubuntu in PRoot

2. Installing AUTOMATIC1111/stable-diffusion-webui

@ankit1057
ankit1057 / InstallChocolateyPackages.ps1
Created February 9, 2023 06:50 — forked from ddieppa/InstallChocolateyPackages.ps1
My "must" chocolatey packages
function main {
Update-Windows-Configuration
Install-Utils
Install-Browsers
Install-Fonts
@ankit1057
ankit1057 / MatchChildViewWithText.kt
Created December 20, 2022 13:47 — forked from dominicthomas/MatchChildViewWithText.kt
Use this to iterate through a recycler view item and check each position to see if a view exists that has some specific text set
fun matchChildViewOfAccountTile(accountName: String, targetViewId: Int, itemMatcher: Matcher<View>): Matcher<View> =
object : BoundedMatcher<View, RecyclerView>(RecyclerView::class.java) {
override fun describeTo(description: Description) {
description.appendText("Has view id $targetViewId and matches $itemMatcher for item with name $accountName")
}
public override fun matchesSafely(recyclerView: RecyclerView): Boolean {
val itemCount = recyclerView.adapter.itemCount
for (i in 0 until itemCount) {
val holder = recyclerView.findViewHolderForAdapterPosition(i)
@ankit1057
ankit1057 / PreferenceHelper.kt
Created May 2, 2022 07:49 — forked from JCarlosR/PreferenceHelper.kt
Helper for shared preferences management - Kotlin version
package com.programacionymas.helpers
import android.content.Context
import android.content.SharedPreferences
import android.preference.PreferenceManager
object PreferenceHelper {
fun defaultPrefs(context: Context): SharedPreferences
= PreferenceManager.getDefaultSharedPreferences(context)
@ankit1057
ankit1057 / README.md
Created February 11, 2021 12:16 — 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

@ankit1057
ankit1057 / Contract Killer 3.md
Created January 20, 2020 05:40
The latest version of my ‘killer contract’ for web designers and developers

Contract Killer

The popular open-source contract for web professionals by Stuff & Nonsense

  • Originally published: 23rd December 2008
  • Revised date: March 15th 2016
  • Original post