Skip to content

Instantly share code, notes, and snippets.

View iniakunhuda's full-sized avatar
👨‍💻
Ancora Imparo!

Miftahul Huda iniakunhuda

👨‍💻
Ancora Imparo!
View GitHub Profile
@SashaKryzh
SashaKryzh / flutter_extension_methods.dart
Last active June 14, 2024 19:49
List of my favorite extension methods in Flutter.
import 'package:flutter/material.dart';
extension BuildContextExtensions on BuildContext {
ThemeData get theme => Theme.of(this);
TextTheme get textTheme => theme.textTheme;
ColorScheme get colorScheme => theme.colorScheme;
DefaultTextStyle get defaultTextStyle => DefaultTextStyle.of(this);
@telkomdeveloper
telkomdeveloper / stack.md
Created August 23, 2021 09:14
Development Stack in Telkom DEV - DXB Divisi Digital Bisnis

Android Development

Tools Name Version
Platform Android OS 4.4 KitKat Level 19 or higher
Programming Language Kotlin JDK 8.x
Architecture Model View ViewModel
Rest Response JSON
Local Database SQLite
View Injection ViewBinding
@takoikatakotako
takoikatakotako / ContentView.swift
Last active May 3, 2024 15:12
SwiftUI delegate sample
import SwiftUI
struct ContentView: View, MyProtocol {
@State var text: String = "My Text"
var body: some View {
NavigationView {
VStack {
Text(text)
NavigationLink(destination: SecondView(delegate: self)) {
Text("2nd View")
@echr
echr / app.js
Last active November 23, 2023 12:05
Simple Laravel + Vue + Laravel Mix + Firebase Notification (PWA, Offline)
// FILE PATH: /resources/js/app.js
require('./bootstrap');
// Import Service Worker Registry
require('./extensions/sw-registry');
import Vue from 'vue';
...
@darkterminal
darkterminal / InstagramFecthMediaAjax.php
Last active December 29, 2020 18:51
Fecth Instagram Media by Username using PHP without Instagram API
<?php
/**
* [getMediaByUsername description]
*
* Author : Imam Ali Mustofa - Betta Dev Indonesia
* Website : www.bettadevindonesia.com
*
* This function will scrap data from instagram without API
* Define username you need and define how many media will you get!
@bseib
bseib / vue-datatables-example.html
Created December 13, 2017 13:48
Vue + DataTables + load once
<!DOCTYPE html>
<html>
<head>
<title>Example Vue + DataTables</title>
<!-- I happened to be using the bootstrap styling w/ DataTables. You may not need this. -->
<link rel="stylesheet" href="/path/to/datatables/DataTables-1.10.16/css/dataTables.bootstrap4.min.css">
</head>
<body>
<div id="example-page">
@soulmachine
soulmachine / jwt-expiration.md
Last active June 21, 2024 14:09
How to deal with JWT expiration?

First of all, please note that token expiration and revoking are two different things.

  1. Expiration only happens for web apps, not for native mobile apps, because native apps never expire.
  2. Revoking only happens when (1) uses click the logout button on the website or native Apps;(2) users reset their passwords; (3) users revoke their tokens explicitly in the administration panel.

1. How to hadle JWT expiration

A JWT token that never expires is dangerous if the token is stolen then someone can always access the user's data.

Quoted from JWT RFC:

@ivan-loh
ivan-loh / main.go
Created December 25, 2016 14:28
mongodb crud in golang
package main
import (
"fmt"
"gopkg.in/mgo.v2"
"gopkg.in/mgo.v2/bson"
"time"
)
type Person struct {

FWIW: I (@rondy) am not the creator of the content shared here, which is an excerpt from Edmond Lau's book. I simply copied and pasted it from another location and saved it as a personal note, before it gained popularity on news.ycombinator.com. Unfortunately, I cannot recall the exact origin of the original source, nor was I able to find the author's name, so I am can't provide the appropriate credits.


Effective Engineer - Notes

What's an Effective Engineer?