Skip to content

Instantly share code, notes, and snippets.

View pratamawijaya's full-sized avatar

Pratama Nur Wijaya pratamawijaya

View GitHub Profile
@sezabass
sezabass / Cache-Article-Whole-CI-File.yml
Last active April 8, 2023 02:47
Cache-Article-Whole-CI-File
name: PR Verification
on:
push:
branches:
- develop
pull_request:
jobs:
pr-verification:
runs-on: ubuntu-latest
@sezabass
sezabass / Cache-Article-Chunk-Build-Runner.yml
Last active April 8, 2023 02:46
Cache-Article-Chunk-Build-Runner
- name: Cache build runner
uses: actions/cache@v2
with:
path: |
**/.dart_tool
**/*.g.dart
**/*.mocks.dart
**/*.config.dart
key: build-runner-${{ hashFiles('**/asset_graph.json', '**/*.dart', '**/pubspec.lock', '**/outputs.json') }}
restore-keys: |
@sezabass
sezabass / Cache-Article-Chunk-Pubspec.yml
Created May 3, 2021 03:50
Cache-Article-Chunk-Pubspec
- name: Cache pubspec dependencies
uses: actions/cache@v2
with:
path: |
${{ env.FLUTTER_HOME }}/.pub-cache
**/.packages
**/.flutter-plugins
**/.flutter-plugin-dependencies
**/.dart_tool/package_config.json
key: build-pubspec-${{ hashFiles('**/pubspec.lock') }}
@sezabass
sezabass / Cache-Article-Chunk-Flutter.yml
Created May 3, 2021 03:48
Cache-Article-Chunk-Flutter
- name: Cache flutter
uses: actions/cache@v2
with:
path: |
${{ env.FLUTTER_HOME }}/bin
key: install-flutter-1.22.6
restore-keys: |
install-flutter-
@Composable
fun CalendarView(
modifier: Modifier = Modifier,
selectedDay: CalendarDay = CalendarDay.create(),
onSelectedDayChange: (CalendarDay) -> Unit = {},
visibleMonth: CalendarDay = CalendarDay.create(),
onVisibleMonthChange: (CalendarDay) -> Unit = {},
today: CalendarDay = CalendarDay.create(),
events: Set<CalendarDay> = emptySet()
) {
@realdadfish
realdadfish / build.gradle.kts
Last active February 27, 2023 07:22
Unmatched attributes issue and solution
val configuration = project.configurations.getByName("prodConsumerReleaseRuntimeClasspath")
val artifactType = Attribute.of("artifactType", String::class.java)
// Some plugin can only work with configurations, while the Android Gradle Plugin (AGP) has the newer "artifact view"
// paradigm implemented. This makes it impossible to resolve most of the created, variant-aware
// configurations from AGP "by hand" without getting unmatched attribute exceptions.
// We now pick one artifact that holds our dependencies and add a custom compatibility rule
// for it which basically accepts all incoming compatibility issues as long as the produced value
// on "the other side" is a JAR or AAR artifact.
configuration.attributes {
attribute(artifactType, "android-classes-directory")
@ygrenzinger
ygrenzinger / CleanArchitecture.md
Last active June 13, 2024 09:52
Summary of Clean Architecture by Robert C. Martin

Summary of book "Clean Architecture" by Robert C. Martin

Uncle Bob, the well known author of Clean Code, is coming back to us with a new book called Clean Architecture which wants to take a larger view on how to create software.

Even if Clean Code is one of the major book around OOP and code design (mainly by presenting the SOLID principles), I was not totally impressed by the book.

Clean Architecture leaves me with the same feeling, even if it's pushing the development world to do better, has some good stories and present robust principles to build software.

The book is build around 34 chapters organised in chapters.

@kaeawc
kaeawc / codecov.yml
Last active December 20, 2021 13:15
Jacoco settings for multi module multi flavor Kotlin Android app
codecov:
branch: master
bot: null
coverage:
precision: 2
round: down
range: "70...100"
status:
@apvasanth03
apvasanth03 / PDFUtil
Created February 4, 2017 04:53
Android PDF Generator example
package com.vm.trinity.common.ui;
import android.annotation.TargetApi;
import android.graphics.Canvas;
import android.graphics.pdf.PdfDocument;
import android.os.AsyncTask;
import android.os.Build;
import android.util.Log;
import android.view.View;
@bmcbride
bmcbride / google-form-to-github-issue.md
Last active April 5, 2024 15:47
Create a new GitHub Issue from a Google Form submission

Wiring up a Google Form to GitHub is not that difficult with a little bit of Apps Script automation. All you need is a Google account, a GitHub account, and a web browser...

Set up your GitHub Personal Access Token

Personal access tokens provide an easy way to interact with the GitHub API without having to mess with OAuth. If you don't already have a personal access token with repo or public_repo access, visit your GitHub settings page and generate a new token.

Be sure to copy your token some place safe and keep it secure. Once generated, you will not be able to view or copy the token again.

Set up the Form & Spreadsheet

  1. Create a Google Form.