Skip to content

Instantly share code, notes, and snippets.

View nikhil-thakkar's full-sized avatar
🎯
Focusing

nikhi1 nikhil-thakkar

🎯
Focusing
View GitHub Profile
@YOU54F
YOU54F / mact-tart
Last active June 8, 2025 19:31
Run GitHub Actions projects, locally, using on MacOS ARM64 Virtual Machines with Tart
#!/bin/bash
PROJECT=${PWD##*/}
PLATFORM=${PLATFORM:-macos-latest}
WORKFLOW=${WORKFLOW:-test.yml}
IMAGE=${IMAGE:-runner}
SSH_USER=${SSH_USER:-runner}
SSH_PASS=${SSH_PASS:-runner}
# IMAGE=${IMAGE:-ghcr.io/cirruslabs/macos-ventura-xcode:14.3.1}
@pyricau
pyricau / WindowSpy.kt
Last active September 15, 2020 20:34
import android.annotation.TargetApi
import android.os.Build.VERSION_CODES
import android.view.View
import android.view.Window
object WindowSpy {
/**
* Installs a listener for new [Window] instances. This should only be called once, any new call
* will uninstall the previous listener.

Introducing Desktop Class Browsing on iPad

  • What does desktop class mean?
    • Getting more done in Safari
    • New download manager
      • Download and upload files in the background while working on other tabs or other apps
    • Full-page zoom, hiding toolbar, per-site preferences
    • All the keyboard shortcuts you expect from a desktop browser
    • At the heart of it all is browsing desktop websites
  • Apple has been working on Web browsers for a long time
@Gustavo-Kuze
Gustavo-Kuze / force-ctrl-c-v.md
Last active July 27, 2025 08:10
Enable copy and paste in a webpage from the browser console
javascript:(function(){
  allowCopyAndPaste = function(e){
  e.stopImmediatePropagation();
  return true;
  };
  document.addEventListener('copy', allowCopyAndPaste, true);
  document.addEventListener('paste', allowCopyAndPaste, true);
  document.addEventListener('onpaste', allowCopyAndPaste, true);
})(); 
@mzgreen
mzgreen / SizeHelper.kt
Last active February 13, 2021 15:23
A ConstraintHelper implementation that has additional layout params: screenHeight_percent and screenWidth_percent which allow to make referenced views height and width to be equal to screenHeight(or screenWidth)*some_percent_value. Where some_percent_value is a value between 0.0 and 1.0.
class SizeHelper @JvmOverloads constructor(
context: Context,
attrs: AttributeSet? = null,
defStyleAttr: Int = 0
) : ConstraintHelper(context, attrs, defStyleAttr) {
private val screenHeight: Int = resources.displayMetrics.heightPixels
private val screenWidth: Int = resources.displayMetrics.widthPixels
private var layoutConstraintScreenHeightPercent = UNSPECIFIED_CONSTRAINT_SCREEN_PERCENT