Skip to content

Instantly share code, notes, and snippets.

View meidikawardana's full-sized avatar

meidikawardana

  • West Pasaman, Indonesia
  • 09:46 (UTC +07:00)
View GitHub Profile
@meidikawardana
meidikawardana / aws-lamp-ubuntu-18_0_4.md
Created April 7, 2021 14:27 — forked from webmechanicx/aws-lamp-ubuntu-18_0_4.md
How To Install LAMP On Ubuntu 16.04 or 18.04 – EC2 Instance

How To Install LAMP On Ubuntu 16.04 – EC2 Instance

Anyone who knows a little bit about the Linux and UNIX platforms, he/she must be heard about the LAMP Stack. LAMP Stack is the group of services that work together in order to serve the dynamic websites and web apps. The LAMP stack can be installed and configured on almost all Linux variants such as Amazon Linux, Ubuntu, Red Hat, and Fedora. In this tutorials, we will explain how to install LAMP on Ubuntu 16.04 EC2 instance. Generally, LAMP stack consists of the following components:

  • L= Linux as the operating system platform.
  • A= Apache as the Web server
  • M= MySQL as the database server
  • P= PHP as the supportive language
@meidikawardana
meidikawardana / install_duc_mac.sh
Created March 13, 2021 07:17 — forked from drivard/install_duc_mac.sh
how to install duc on mac using brew
# /bin/bash
#
## Install duc from http://duc.zevv.nl/
## Adapted from https://gist.github.com/turtlemonvh/09a79a810d485f18af19
## Find the latest release here https://github.com/zevv/duc/releases
DUC_VERSION=1.4.3
if ! which brew ; then
echo "ERROR: brew is required"
fun main() {
val peopleAges = mutableMapOf<String, Int>(
"Fred" to 30,
"Ann" to 23
)
peopleAges.put("Barbara", 42)
peopleAges["Joe"] = 51
peopleAges["Fred"] = 31
peopleAges.forEach { print("${it.key} is ${it.value}, ") }
println()
@meidikawardana
meidikawardana / KotlinList.kt
Last active December 28, 2020 03:49
Use Kotlin List, Loops, and builder pattern. Learned from Google Codelabs https://developer.android.com/codelabs/basic-android-kotlin-training-lists
open class Item(val name: String, val price: Int)
class Noodles : Item("Noodles", 10){
override fun toString(): String {
return name
}
}
class Vegetables(vararg val toppings: String) : Item("Vegetables", 5){
override fun toString(): String {
fun main() {
val numbers = listOf(0, 3, 8, 4, 0, 5, 5, 8, 9, 2)
println("list: ${numbers}")
println("sorted: ${numbers.sorted()}")
val setOfNumbers = numbers.toSet()
println("set: ${setOfNumbers}")
val set1 = setOf(1,2,3)
val set2 = mutableSetOf(3,2,1)
println("$set1 == $set2: ${set1 == set2}")
println("contains 7: ${setOfNumbers.contains(7)}")
/**
* Program that implements classes for different kinds of dwellings.
* Shows how to:
* Create class hierarchy, variables and functions with inheritance,
* abstract class, overriding, and private vs. public variables.
*/
import kotlin.math.PI
import kotlin.math.sqrt
@meidikawardana
meidikawardana / File.kt
Created November 22, 2020 10:30
code result from google kotlin codelabs
fun main() {
val age = 24
val layers = 5
printCakeCandles(age)
printCakeTop(age)
printCakeBottom(age, layers)
}
fun printCakeTop(age: Int){
repeat(age + 2){
@meidikawardana
meidikawardana / instagram_card.dart
Created October 11, 2019 14:02
file instagram_card.dart untuk aplikasi instagram_list
import 'package:flutter/material.dart';
class InstagramCard extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Column(
children: <Widget>[
Row(
// row #1
children: [
import 'package:flutter/material.dart';
void main() => runApp(AplikasiLikeInstagram());
class InstagramCards extends StatelessWidget {
@override
Widget build(BuildContext context) {
return ListView(
children: <Widget>[
Column(
@meidikawardana
meidikawardana / main.dart
Created September 13, 2019 02:32
like_app s/d row #3 selesai
import 'package:flutter/material.dart';
void main() => runApp(AplikasiLikeInstagram());
class InstagramCards extends StatelessWidget {
@override
Widget build(BuildContext context) {
return ListView(
children: <Widget>[
Column(