Skip to content

Instantly share code, notes, and snippets.

View huycozy's full-sized avatar

Huy huycozy

  • Nevercode
View GitHub Profile
@huycozy
huycozy / addtoapp_ios_embed_framework_optionB.md
Last active September 25, 2023 14:31
Add to app iOS - Embed frameworks in Xcode (option B)
  1. Add test package to pubspec.yaml
  • Old:
flutter_driver:
  sdk: flutter
  • New:
@huycozy
huycozy / addtoapp_ios_embed_cocoapods_optionA.md
Last active June 21, 2024 03:21
Add to app iOS - Embed cocoapods (option A)

References

Step by step

1. From the terminal, go to your current iOS native project, for eg: /Users/.../reproduce_issue_ios_native_addtoapp_optionA/

2. Group all current files/directories into a new directory (named MyApp for eg)

@huycozy
huycozy / EachDirectoryPath.md
Created June 15, 2023 04:34 — forked from granoeste/EachDirectoryPath.md
[Android] How to get the each directory path.

System directories

Method Result
Environment.getDataDirectory() /data
Environment.getDownloadCacheDirectory() /cache
Environment.getRootDirectory() /system

External storage directories

@huycozy
huycozy / directory_picker.md
Created October 25, 2023 03:59
GTK program to open directory picker
  1. Create directory_picker.c file:
#include <gtk/gtk.h>

// Callback function for the "Open" button
void open_button_clicked(GtkWidget *widget, gpointer data) {
    GtkWidget *dialog;
    const gchar *selected_folder;
@huycozy
huycozy / flutter_wsl2_windows_tuts.md
Last active November 3, 2023 03:49
Guideline on how to build and run Linux app on WSL2 with VS Code on Windows
  1. Make sure you installed VS Code here: https://code.visualstudio.com/
  2. Open VS Code, find WSL from Extensions and install it
  3. Click on Open a remote windows:

image

  1. Click on Connect to WSL using Distro... By default, there is only Ubuntu (wsl1), you can use it if you want. But if you want to use WSL2, need to install another distro

4.1. List all available distros:

@huycozy
huycozy / gtk_text_example.md
Last active July 1, 2024 05:05
Simple GTK text example
  1. Create gtk_text_example.c file:
#include <gtk/gtk.h>

// Callback function to handle the "destroy" signal
void on_destroy(GtkWidget *widget, gpointer data) {
    gtk_main_quit();
}
// Copyright 2019 the Dart project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license
// that can be found in the LICENSE file.
import 'package:flutter/material.dart';
import 'package:web/web.dart';
void main() => runApp(const MyApp());
import "package:flutter/material.dart";
import "package:video_player/video_player.dart";
void main() => runApp(const VideoApp());
/// Stateful widget to fetch and then display video content.
class VideoApp extends StatefulWidget {
const VideoApp({super.key});
@override
_VideoAppState createState() => _VideoAppState();
@huycozy
huycozy / open_link_example.md
Created July 1, 2024 05:08
GTK open link example