Skip to content

Instantly share code, notes, and snippets.

View mukhtharcm's full-sized avatar
🎯
Focusing

Muhammed Mukhthar CM mukhtharcm

🎯
Focusing
View GitHub Profile
@mukhtharcm
mukhtharcm / not_model.g.dart
Created March 16, 2021 12:19
TypeAdaptor Example for blog
// GENERATED CODE - DO NOT MODIFY BY HAND
part of 'note_model.dart';
// **************************************************************************
// TypeAdapterGenerator
// **************************************************************************
class NoteModelAdapter extends TypeAdapter<NoteModel> {
@override
@mukhtharcm
mukhtharcm / ternary-operator-flutter.dart
Last active March 15, 2021 12:25
Example for using ternary operator in Flutter.
import 'package:flutter/material.dart';
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
@mukhtharcm
mukhtharcm / post_list.dart
Created March 14, 2021 10:05
Gist for Blogger api in Flutter Post
class PostList {
String kind;
String nextPageToken;
String prevPageToken;
List<Items> items;
PostList({this.kind, this.nextPageToken, this.prevPageToken, this.items});
PostList.fromJson(Map<String, dynamic> json) {
kind = json['kind'];
import 'package:flutter/material.dart';
void main() {
runApp(MaterialApp(home: Home()));
}
class Home extends StatefulWidget {
@override
_HomeState createState() => _HomeState();
}
@mukhtharcm
mukhtharcm / git_submodules.md
Created July 18, 2020 06:10 — forked from gitaarik/git_submodules.md
Git Submodules basic explanation

Git Submodules basic explanation

Why submodules?

In Git you can add a submodule to a repository. This is basically a repository embedded in your main repository. This can be very useful. A couple of advantages of using submodules:

  • You can separate the code into different repositories.
@mukhtharcm
mukhtharcm / redirecting-github-pages.md
Created July 13, 2020 11:51 — forked from domenic/redirecting-github-pages.md
Redirecting GitHub pages after a repository move

Redirecting GitHub Pages after a repository move

The problem

You have a repository, call it alice/repo. You would like to transfer it to the user bob, so it will become bob/repo.

However, you make heavy use of the GitHub Pages feature, so that people are often accessing https://alice.github.io/repo/. GitHub will helpfully redirect all of your repository stuff hosted on github.com after the move, but will not redirect the GitHub Pages hosted on github.io.

The solution