Skip to content

Instantly share code, notes, and snippets.

@Mugurell
Mugurell / Bug 1815421 - AddLoginFragment.patch
Created February 27, 2023 16:54
Smallest changes needed to fix the issue from Bug 1815421
Index: fenix/app/src/main/java/org/mozilla/fenix/settings/logins/fragment/AddLoginFragment.kt
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/fenix/app/src/main/java/org/mozilla/fenix/settings/logins/fragment/AddLoginFragment.kt b/fenix/app/src/main/java/org/mozilla/fenix/settings/logins/fragment/AddLoginFragment.kt
--- a/fenix/app/src/main/java/org/mozilla/fenix/settings/logins/fragment/AddLoginFragment.kt (revision d4fdfa701d64b5861e7da820c47be344ffade347)
+++ b/fenix/app/src/main/java/org/mozilla/fenix/settings/logins/fragment/AddLoginFragment.kt (date 1677516765310)
@@ -50,7 +50,7 @@
private var duplicateLogin: SavedLogin? = null
@Mugurell
Mugurell / Use yubikeys for Github on MacOS
Created January 28, 2023 18:06
Collection of resources on configuring your Yubikey for MacOs ssh connections and git commit signing.
##Probably the best series for the setup of your new smart card:
https://www.youtube.com/watch?v=rGZtlgNhAVU&list=PLmoQ11MXEmahVl_uJVH0-a3XJtMV59PBu
&nbsp;
-----
-----
------
&nbsp;
@Mugurell
Mugurell / mozconfig
Created November 23, 2022 13:00
Basic configuration for building the GeckoView-Example app from sources
# Build GeckoView/Firefox for Android:
ac_add_options --enable-application=mobile/android
# Targeting the following architecture.
# For regular phones, no --target is needed.
# For x86 emulators (and x86 devices, which are uncommon):
# ac_add_options --target=i686
# For newer phones or Apple silicon
ac_add_options --target=aarch64
# For x86_64 emulators (and x86_64 devices, which are even less common):
# ac_add_options --target=x86_64
Index: app/src/main/java/org/mozilla/fenix/home/WallpapersObserver.kt
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/app/src/main/java/org/mozilla/fenix/home/WallpapersObserver.kt b/app/src/main/java/org/mozilla/fenix/home/WallpapersObserver.kt
--- a/app/src/main/java/org/mozilla/fenix/home/WallpapersObserver.kt (revision 30a8a25d8100271f63e38eba4ec26f99101f517a)
+++ b/app/src/main/java/org/mozilla/fenix/home/WallpapersObserver.kt (date 1662360155911)
@@ -87,11 +87,12 @@
*/
Index: app/src/main/java/org/mozilla/fenix/home/HomeFragment.kt
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/app/src/main/java/org/mozilla/fenix/home/HomeFragment.kt b/app/src/main/java/org/mozilla/fenix/home/HomeFragment.kt
--- a/app/src/main/java/org/mozilla/fenix/home/HomeFragment.kt (revision 99759dd728a07bcb4eb619c7b1d76d9f279516e5)
+++ b/app/src/main/java/org/mozilla/fenix/home/HomeFragment.kt (date 1662363996585)
@@ -208,10 +208,14 @@
// DO NOT ADD ANYTHING ABOVE THIS getProfilerTime CALL!
@Mugurell
Mugurell / component_credit_cards.xml
Created May 18, 2021 14:02
Fenix "Saved cards" layout that with a "Add credit card" below the list of cards and above parent bottom
<?xml version="1.0" encoding="utf-8"?>
<!-- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
<androidx.constraintlayout.widget.ConstraintLayout
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:id="@+id/credit_cards_wrapper"
android:layout_width="match_parent"
@Mugurell
Mugurell / Cucumber.java
Created January 30, 2019 13:30 — forked from nbransby/Cucumber.java
testInstrumentationRunner (replacement for android.support.test.runner.AndroidJUnitRunner) and a org.junit.runner.Runner (replacement for cucumber.api.junit.Cucumber) that combines cucumber-android (2.40) and cucumber-junit (2.40) to run scenarios isolated in seperate processes via orchestrator 1.0.2
package cucumber.runtime.android;
import android.content.Context;
import android.support.test.InstrumentationRegistry;
import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.ClassRule;
import org.junit.runner.Description;
import org.junit.runner.notification.RunNotifier;
function colorWorkdays() {
// get the sheet we want to work with.
var sheet = SpreadsheetApp.getActiveSpreadsheet().getActiveSheet();
// determine how long the sheet is
var lastColumn = sheet.getLastColumn() + 1;
// the sheet indexes are 1 based :-O
var workDaysHeaderRowIndex = 1;
var mondayColor = "#2fb726";
var tuesdayColor = "#ccffcc";
// Create the widget
final DatePicker input = new DatePicker(context);
....
final View view = (View) input;
// Wrap the widget in a LinearLayout to prevent it from being chopped
final LinearLayout widgetWrapper = new LinearLayout(context);
final LinearLayout.LayoutParams parentParams = new LinearLayout.LayoutParams(
ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT);
parentParams.gravity = Gravity.CENTER;
@Mugurell
Mugurell / ExampleSpekTest
Last active March 27, 2019 11:30
Spek + JUnit5 config for Android project
import org.jetbrains.spek.api.Spek
import org.jetbrains.spek.api.dsl.given
import org.jetbrains.spek.api.dsl.it
import org.junit.Assert
class ExampleSpekTest : Spek({
val x = 2
val y = 3