Skip to content

Instantly share code, notes, and snippets.

View faridlab's full-sized avatar
🍀
Luck is the only skill

Farid Hidayat faridlab

🍀
Luck is the only skill
View GitHub Profile
@faridlab
faridlab / spring-boot-cheatsheet.java
Created August 27, 2021 15:27 — forked from jahe/spring-boot-cheatsheet.java
Spring Boot Cheatsheet
// Enable component-scanning and auto-configuration with @SpringBootApplication Annotation
// It combines @Configuration + @ComponentScan + @EnableAutoConfiguration
@SpringBootApplication
public class FooApplication {
public static void main(String[] args) {
// Bootstrap the application
SpringApplication.run(FooApplication.class, args);
}
}
@faridlab
faridlab / gist:e793c80b1619a3ee767c595a36d3adf7
Created July 19, 2021 03:18 — forked from digitaljhelms/gist:4287848
Git/GitHub branching standards & conventions

Branching

Quick Legend

Description, Instructions, Notes
Instance Branch
@faridlab
faridlab / variable_sized_grid_view.dart
Created February 14, 2021 16:02 — forked from letsar/variable_sized_grid_view.dart
VariableSizedGridView for Flutter (Masonry style)
import 'dart:math' as math;
import 'package:flutter/foundation.dart';
import 'package:flutter/rendering.dart';
import 'package:flutter/widgets.dart';
/// Signature for a function that creates a [TileSize] for a given index.
typedef TileSize IndexedTileSizeBuilder(int index);
/// Creates grid layouts with a fixed number of spans in the cross axis.
@faridlab
faridlab / gist:3126880
Created July 17, 2012 03:41
Make backbone.js inhertance work for you! (or make view inheritance work in general)
/**
* Give backbone an easier way to access super properties and methods.
*/
Backbone.View.prototype.parent = Backbone.Model.prototype.parent = Backbone.Collection.prototype.parent = function(attribute, options) {
/**
* Call this inside of the child initialize method. If it's a view, it will extend events also.
* this.parent('inherit', this.options); <- A views params get set to this.options
*/
if(attribute == "inherit") {