Skip to content

Instantly share code, notes, and snippets.

View febritecno's full-sized avatar
🏠
Working from home

Febrian Dwi Putra febritecno

🏠
Working from home
  • linkedin.com/in/febrian-dwi-putra
  • Bojonegoro, indonesia
  • 00:04 (UTC +07:00)
View GitHub Profile
@febritecno
febritecno / macos-optimize-setup.md
Created September 15, 2024 10:38 — forked from nmccready/macos-optimize-setup.md
macOS optimize setup

macOS 10.12 Sonoma and Up Setup

Most things should work in newer versions of macOs with slight tweaks.

Custom recipe to get macOS 10.12 Sierra running from scratch, setup applications and developer environment. This is very similar (and currently mostly the same) as my 10.11 El Capitan setup recipe and 10.10 Yosemite setup recipe. I am currently tweaking this for 10.12 Sierra and expect to refine this gist over the next few weeks.

I use this gist to keep track of the important software and steps required to have a functioning system after a semi-annual fresh install. I generally reinstall each computer from scratch every 6 months, and I do not perform upgrades between releases.

This keeps the system performing at top speeds, clean of trojans, spyware, and ensures that I maintain good organizational practices for my content and backups. I highly recommend this.

@febritecno
febritecno / config.ini
Created September 13, 2024 13:29
Emulator Smooth
PlayStore.enabled = no
abi.type = arm64-v8a
avd.id = <build>
avd.ini.encoding = UTF-8
avd.name = <build>
disk.cachePartition = yes
disk.cachePartition.size = 66MB
disk.dataPartition.path = <temp>
disk.dataPartition.size = 6442450944
disk.systemPartition.size = 0
@febritecno
febritecno / datetime_picker.dart
Last active December 7, 2023 14:14
Flutter methods
datePicker(context, data(result)) async {
DateTime currentDate = DateTime.now();
DateTime? pickedDate = await showDatePicker(
context: context,
initialDate: currentDate,
firstDate: DateTime(2015, 8),
lastDate: DateTime(2101),
);
if (pickedDate != null) {
@febritecno
febritecno / check_folder_exist_s3.js
Last active February 29, 2024 09:21
AWS S3 operation
s3.listObjectsV2(params, (err, data) => {
const folderExists = data.Contents.length > 0;
// (folderExists == true) if the folder exists
});
async function checkFolderExist(key) {
try {
const objects = await s3.listObjectsV2({ Bucket: BUCKET_NAME, Prefix: key }).promise();
return objects.Contents.length > 0;
@febritecno
febritecno / no-rebase.md
Last active July 28, 2023 01:45
Liner commit tanpa rebase by febrian dwi putra

Linier commit, tanpa capek rebase !!!

  1. create branch feature from master (important)
  2. doing…. {a lot duplicate commit}
  3. clone branch feature with name feat/{feature}-dev (tmp)
  4. git rebase -i origin/master + squash (biar satu commit)
  5. git push origin feat/{feature}-dev -f
  6. create merge request / pull request to branch development
-- Merging decision tree log ---
application
INJECTED from /Users/febritecno/PROJECT/KANTOR/dteksi/dteksi/android/app/src/main/AndroidManifest.xml:16:4-48:19
MERGED from [:url_launcher_android] /Users/febritecno/PROJECT/KANTOR/dteksi/dteksi/build/url_launcher_android/intermediates/merged_manifest/release/AndroidManifest.xml:9:5-14:19
MERGED from [:url_launcher_android] /Users/febritecno/PROJECT/KANTOR/dteksi/dteksi/build/url_launcher_android/intermediates/merged_manifest/release/AndroidManifest.xml:9:5-14:19
MERGED from [:open_filex] /Users/febritecno/PROJECT/KANTOR/dteksi/dteksi/build/open_filex/intermediates/merged_manifest/release/AndroidManifest.xml:12:5-23:19
MERGED from [:open_filex] /Users/febritecno/PROJECT/KANTOR/dteksi/dteksi/build/open_filex/intermediates/merged_manifest/release/AndroidManifest.xml:12:5-23:19
MERGED from [androidx.window:window:1.0.0-beta04] /Users/febritecno/.gradle/caches/transforms-3/43a316513d040e99de62269fc41a9c7e/transformed/jetified-window-1.0.0-beta04/AndroidManifest.xml:24
@febritecno
febritecno / flutter-cicd-github-ci.yaml
Last active December 14, 2022 10:48
Get auto responsive size without size / screenutil
name: Build Flutter APKs & Appbundle
on: push
jobs:
# Build APKs
build_apks:
name: Build APKs
runs-on: ubuntu-latest
steps:
- name: Checkout code
@febritecno
febritecno / resolver_json.dart
Created October 14, 2022 06:16
Dart helper
// handle null and handle deepest data json
T? resolve<T>({
required Map<String, dynamic>? json,
required String path,
T? defaultValue,
}) {
try {
if (json == null) {
return defaultValue;
@febritecno
febritecno / button_component.dart
Last active October 10, 2022 07:11
universal textField component
import 'package:bjb_epays_mobile/marketplace/shared/theme.dart';
import 'package:bjb_epays_mobile/shared/shared_colors.dart';
import 'package:flutter/material.dart';
class ButtonComponent extends StatelessWidget {
final VoidCallback? onTap;
final String? title;
final double? fontSize, borderCircular, height, width;
final Color? color, fontColor;
final FontWeight? fontWeight;