Skip to content

Instantly share code, notes, and snippets.

View ihsanberahim's full-sized avatar
💭
focusing on the strong base for long term

Muhammad Nur'Ihsan Bin Berahim ihsanberahim

💭
focusing on the strong base for long term
View GitHub Profile
@ihsanberahim
ihsanberahim / main.dart
Created October 7, 2023 02:01
volcanic-rhythm-8892
// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
// for details. 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';
void main() => runApp(MyApp());
class MaskPainter extends CustomPainter {
@override
@ihsanberahim
ihsanberahim / main.dart
Created October 7, 2023 02:00
volcanic-rhythm-8892
void main() {
for (int i = 0; i < 5; i++) {
print('hello ${i + 1}');
}
}
@ihsanberahim
ihsanberahim / main.dart
Last active July 9, 2023 16:30
elegant-marble-1300
class Animal {
String name;
int age;
Animal(this.name, this.age);
void speak() {
print('I am an animal');
}
}
@ihsanberahim
ihsanberahim / main.dart
Created June 28, 2023 09:47
chilly-aqueduct-4156
// https://chat.openai.com/share/07a8df63-7d5d-4a71-807e-354e6733a2c4
import 'dart:convert';
void main() {
List<Map<String, dynamic>> myList = [
{
'jenis': 'admin',
'id': '1',
'managed': [
{'noPlat': '123124235.0', 'nama': 'SASUKE', 'jenisFail': 'IT', 'email': 'null'},
@ihsanberahim
ihsanberahim / main.dart
Last active June 28, 2023 09:47
chilly-aqueduct-4156
// https://chat.openai.com/share/07a8df63-7d5d-4a71-807e-354e6733a2c4
import 'dart:convert';
void main() {
List<Map<String, dynamic>> myList = [
{
'jenis': 'admin',
'id': '1',
'managed': [
{'noPlat': '123124235.0', 'nama': 'SASUKE', 'jenisFail': 'IT', 'email': 'null'},
@ihsanberahim
ihsanberahim / _README.md
Last active October 7, 2021 05:39
Squarespace Mobile Header overrides

Squarespace Mobile Header overrides

  • #collection-body-id
    • get it from the page source <body id="">
  • https://image-url
    • since no media storage. Create Gallery page and disabled it.
  • upload image in the gallery page and open the page to get the image url

There are two types of markup in Liquid: Output and Tag.

  • Output markup (which may resolve to text) is surrounded by
{{ matched pairs of curly brackets (ie, braces) }}
  • Tag markup (which cannot resolve to text) is surrounded by

MySQL Download URL

https://dev.mysql.com/get/Downloads/MySQL-5.5/mysql-5.5.56-linux-glibc2.5-x86_64.tar.gz

Open the terminal and follow along:

  • Uninstall any existing version of MySQL
sudo rm /var/lib/mysql/ -R
@ihsanberahim
ihsanberahim / app.shared.validators.ts
Created July 21, 2020 06:22
Custom Proper email validation
import { AbstractControl } from '@angular/forms';
export function ValidateProperEmail(control: AbstractControl) {
const error = { properEmail: true };
if (!control.value) {
return error;
}

LNMP

  • Linux
  • Nginx
  • Mysql
  • Php