This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# https://support.atlassian.com/bitbucket-cloud/docs/configure-bitbucket-pipelinesyml | |
# Maintainer: Ezra Lazuardy <ezra@exclolab.com> | |
definitions: | |
steps: | |
- step: &build-project | |
name: Build Project | |
image: ezralazuardy/ravel:8.2 | |
services: | |
- mysql | |
script: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# based on https://stackoverflow.com/a/37266353/8109202 | |
# licensed with https://creativecommons.org/licenses/by-sa/4.0 | |
# assuming this is your laravel project directory | |
cd /var/www/laravel | |
sudo chown -R $USER:www-data . | |
# if any node_modules exists, remove it | |
sudo rm -rf node_modules |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<Directory "/"> | |
# ---------------------------------------------------------------------- | |
# | Security Headers | | |
# ---------------------------------------------------------------------- | |
<IfModule mod_headers.c> | |
# ---------------------------------------------------------------------- | |
# | HTTP Strict Transport Security (HSTS) | | |
# ---------------------------------------------------------------------- | |
Header always set Strict-Transport-Security "max-age=63072000; includeSubDomains; preload" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
data class Country(val name: String, val case: Int, val recovered: Int, val death: Int) | |
val countries = listOf( | |
Country("Indonesia", 7418, 913, 635), | |
Country("United States", 827038, 75528, 45525), | |
Country("South Korea", 10694, 8277, 238), | |
Country("Switzerland", 27926, 19400, 1491), | |
Country("China", 82788, 77151, 4632), | |
Country("Germany", 148704, 87055, 5100), | |
Country("Spain", 208389, 85915, 21717) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
data class Person(val name: String, val age: Int) | |
val data = listOf( | |
Person("Ezra Lazuardy", 18), | |
Person("__##CORRUPTED#Albert Einstein", 0), | |
Person("__##CORRUPTED#Mark Zuckerberg", 0), | |
Person("Fadzrian", 20), | |
Person("Kurniawan Vendy", 21), | |
Person("__##CORRUPTED#Dea Kamila", 0), | |
Person("Krishna Mahira", 10), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
val data = arrayOf(10, 2, 2, 6, 8, 90, 23, 15, 11, 4, 2, 6, 7, 8, 1, 3, 16, 8, 2, 1, 10) | |
fun main() { | |
println("Mean: ${mean(data)}") | |
println("Median: ${median(data)}") | |
println("Modus: ${modus(data)}") | |
} | |
private fun mean(data: Array<Int>): String = | |
"%.2f".format(data.average()) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
if ![$(id -u)=0]; then | |
echo "Please run this script as root" >&2 | |
exit 1 | |
fi | |
echo -1 > /sys/module/usbcore/parameters/autosuspend | |
echo "Webcam bug has been fixed" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.quick.jti.satpam.utils | |
import com.google.gson.GsonBuilder | |
import com.quick.jti.satpam.config.AppConfig | |
import com.quick.jti.satpam.config.AppConfig.IO_TIMEOUT | |
import com.quick.jti.satpam.model.destination.* | |
import com.quick.jti.satpam.model.items.* | |
import okhttp3.OkHttpClient | |
import retrofit2.Retrofit | |
import retrofit2.converter.gson.GsonConverterFactory |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Created by Ezra Lazuardy on 05/02/20, 10:26 AM | |
* Copyright (c) 2020 . All rights reserved. | |
* Last modified 05/02/20, 10:26 PM | |
*/ | |
package com.quick.jti.satpam.utils | |
import com.google.gson.* | |
import java.lang.reflect.Type |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"CLASSNAME": "OutItems", | |
"DATA": { | |
} | |
} |
NewerOlder