Skip to content

Instantly share code, notes, and snippets.

View wicaksana's full-sized avatar

Muhammad Arif Wicaksana wicaksana

  • Enschede, The Netherlands
View GitHub Profile
@wicaksana
wicaksana / persistence.xml
Created November 2, 2016 11:38
Sample of persistence.xml. I always get lost on this
<?xml version="1.0" encoding="UTF-8"?>
<persistence xmlns="http://xmlns.jcp.org/xml/ns/persistence"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/persistence
http://xmlns.jcp.org/xml/ns/persistence/persistence_2_1.xsd"
version="2.1">
<persistence-unit name="EmployeeService" transaction-type="RESOURCE_LOCAL">
<provider>org.hibernate.jpa.HibernatePersistenceProvider</provider>
@wicaksana
wicaksana / test.py
Created November 6, 2016 01:52
trying to display gist to blogger
print("hello world")
@wicaksana
wicaksana / application.properties
Created December 17, 2016 22:49
Spring Boot configuration file
#
# Database (postgresql)
#
spring.jpa.database=POSTGRESQL
spring.datasource.platform=postgres
spring.jpa.show-sql=true
spring.jpa.hibernate.ddl-auto=create-drop
spring.database.driverClassName=org.postgresql.Driver
spring.datasource.url=jdbc:postgresql://localhost:5432/spring_rest_service
@wicaksana
wicaksana / Gradle for Spring Boot
Created February 3, 2017 23:10
Gradle for Spring Boot
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath("org.springframework.boot:spring-boot-gradle-plugin:1.5.1.RELEASE")
}
}
apply plugin: 'java'
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.example</groupId>
<artifactId>selenium-basic-mvn</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>jar</packaging>
<dependencies>
<dependency>
@wicaksana
wicaksana / README.md
Created May 7, 2017 08:38 — forked from leonardofed/README.md
A curated list of AWS resources to prepare for the AWS Certifications


A curated list of AWS resources to prepare for the AWS Certifications

A curated list of awesome AWS resources you need to prepare for the all 5 AWS Certifications. This gist will include: open source repos, blogs & blogposts, ebooks, PDF, whitepapers, video courses, free lecture, slides, sample test and many other resources.

For more about AWS and AWS Certifications and updates to this Gist you should follow me @leonardofed


@wicaksana
wicaksana / install.sh
Last active September 11, 2017 23:03
Provisioning EC2 machine for my typical needs
#!/bin/bash
# Docker
# taken from https://www.digitalocean.com/community/tutorials/how-to-install-and-use-docker-on-ubuntu-16-04
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
sudo apt-get update
sudo apt-get install -y docker-ce
sudo usermod -aG docker ${USER}
from pyspark.sql import SparkSession
spark = SparkSession \
.builder \
.appName("test") \
.getOrCreate()
# data is taken from https://github.com/GoogleCloudPlatform/serverless-spark-workshop/blob/main/cell-tower-anomaly-detection/cell-tower-anomaly-detection/01-datasets/telecom_customer_churn_data.csv
customer_churn = spark.read.format('csv') \
.option('header','true')\
@wicaksana
wicaksana / main.tf
Created June 27, 2024 14:16
Terraform script for Neo4j Aura
terraform {
required_providers {
restapi = {
source = "mastercard/restapi"
version = "1.18.2"
}
}
required_version = ">= 0.12"
}
@wicaksana
wicaksana / variables.tf
Last active June 27, 2024 15:13
Terraform for Aura
variable "aura_version" {
type = string
description = "Neo4j Aura version"
default = "5"
validation {
condition = contains(
["5"],
var.aura_version
)