Skip to content

Instantly share code, notes, and snippets.

View nggepe's full-sized avatar
▶️
Play the code

Gilang Pratama nggepe

▶️
Play the code
View GitHub Profile
@nggepe
nggepe / mamp-php-versions.md
Created June 11, 2024 00:37 — forked from codeadamca/mamp-php-versions.md
How to add new PHP versions to MAMP on a Mac

Adding Versions of PHP to MAMP on a Mac

If you're working on a project that requires a version of PHP higher than the versions that MAMP comes with, you can easily add additional verions.

My version of MAMP came installed with PHP 7.4.21 and 8.0.8. I'm attempting to use MAMP to host a Laravel application which requires at least PHP 8.1.

The version of PHP MAMP uses is often different than the version you have installed. I have installed PHP using Brew. I'm currently running PHP 8.1.8. If you want to check your installed version of PHP, use the terminal and run the following command:

php --version
@nggepe
nggepe / pyenv.log
Created February 12, 2023 08:24
pyenv debug log
gilangpratama@Gilangs-MacBook-Air python-projects % pyenv install 3.8.10
Unknown option: 1
Usage: head [-options] <url>...
-m <method> use method for the request (default is 'HEAD')
-f make request even if head believes method is illegal
-b <base> Use the specified URL as base
-t <timeout> Set timeout value
-i <time> Set the If-Modified-Since header on the request
-c <conttype> use this content-type for POST, PUT, CHECKIN
-a Use text mode for content I/O
@nggepe
nggepe / postgres.md
Created January 18, 2023 12:49 — forked from phortuin/postgres.md
Set up postgres + database on MacOS (M1)

Based on this blogpost.

Install with Homebrew:

$ brew install postgresql@14

(The version number 14 needs to be explicitly stated. The @ mark designates a version number is specified. If you need an older version of postgres, use postgresql@13, for example.)

@nggepe
nggepe / next-kit__heads_master.json
Last active July 3, 2023 10:09
SCM NEXT KIT COVERAGE
coverage
@nggepe
nggepe / README.md
Created December 4, 2022 08:08 — forked from lopspower/README.md
Hexadecimal color code for transparency

Hexadecimal color code for transparency

Twitter

How to set transparency with hex value ?

For example, you want to set 40% alpha transparence to #000000 (black color), you need to add 66 like this #66000000.

Download This sample on Google Play Store

import 'dart:convert';
void main() {
String datajson = "{\n \"usia\": 20,\n \"nama\": \"Marry jane\"\n}";
final guru = Guru.fromJson(datajson);
print(guru);
print(datajson);
}
class Guru {
@nggepe
nggepe / Media_query_example.dart
Created November 15, 2021 02:19
Contoh mediaquery
// 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 MyApp extends StatelessWidget {
@override
@nggepe
nggepe / stateless_widget_ex.dart
Created November 4, 2021 09:12
statless widget example
import 'package:flutter/material.dart';
const Color darkBlue = Color.fromARGB(255, 18, 32, 47);
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
@override
void main(){
bool a = true;
bool b = false;
print("&& AND");
print(a&&b);
print("\n|| OR");
print(a||b);
print("! NOT b");
print(!b);
void main(){
double a = 20;
double b = 30;
var c = null;
var d;
print("operator (=) hasil d: ");
d = a;
print(d);