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 / indonesia.sql
Created June 8, 2021 17:38
Indonesia Provinces, Cities, District and Sub District
This file has been truncated, but you can view the full file.
SET NAMES utf8;
SET FOREIGN_KEY_CHECKS = 0;
INSERT INTO `countries`(id, isocode, name, phonecode) VALUES (1, 'ID', 'Indonesia', '62');
-- ----------------------------
-- Table structure for provinces
-- ----------------------------
-- DROP TABLE IF EXISTS `provinces`;
@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 / ssh_passwordless
Created July 24, 2019 10:58
An alternative way to install public key in the remote machine's authorized_keys
cat ~/.ssh/id_rsa.pub | ssh USER@HOST "mkdir -p ~/.ssh && cat >> ~/.ssh/authorized_keys"
@faridlab
faridlab / app.scss
Created March 1, 2018 17:57
ionic slide auto height
ion-slide:not(.swiper-slide-active) > div {
display: hidden;
opacity: 0;
height: 0;
transition: display 0s, opacity 0.5s linear;
}
ion-slide:nth-last-child(4):not(.swiper-slide-active) + ion-slide:nth-last-child(3):not(.swiper-slide-active) + ion-slide:nth-last-child(2):not(.swiper-slide-active) + ion-slide:not(.swiper-slide-active) > div,
ion-slide:nth-last-child(3):not(.swiper-slide-active) + ion-slide:nth-last-child(2):not(.swiper-slide-active) + ion-slide:not(.swiper-slide-active) > div,
ion-slide:nth-last-child(2):not(.swiper-slide-active) + ion-slide:not(.swiper-slide-active) > div {
@faridlab
faridlab / shuffle-array.js
Last active January 5, 2018 12:55
Javascript Shuffle Array
const shuffle = array.map((a) => [Math.random(),a]).sort((a,b) => a[0]-b[0]).map((a) => a[1]);
@faridlab
faridlab / Anu gemes
Created February 16, 2017 09:40
Anu gemes looping
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Anu</title>
</head>
<body>
<table>
<?php for ($i=0; $i < 5; $i++): ?>
<tr>
// xin View
var view = xin.ui.Outlet.extend({
_isLoading: false,
bundles: [],
form: {},
events: {
'change #compareBibleSelect': 'bibleChange',
'submit form#formCompareSubmit': 'compareSubmit'
},
#!/bin/bash
echo "***************************************************************";
echo "* Android prepare for playstore *";
echo "*-------------------------------------------------------------*";
echo "* Before further more, please make sure: *";
echo "* - check last version of the Android application *";
echo "* - check API production ( Java, Javascript and Objective C ) *";
echo "* - check packages to include your application *";
echo "* - check debuggable in AndroidManifest.xml to be 'false' *";