Skip to content

Instantly share code, notes, and snippets.

View hendisantika's full-sized avatar
💻
Coding... coding.. coding.... and coding..!

Hendi Santika hendisantika

💻
Coding... coding.. coding.... and coding..!
View GitHub Profile
@hendisantika
hendisantika / Rupiah.as
Created October 21, 2020 09:24 — forked from faisalman/Rupiah.as
Konversi Angka ke format Rupiah & vice versa (C#, PHP, JavaScript, ActionScript 3.0)
package
{
/**
* ActionScript 3.0 Code Snippet
* Convert Number to Rupiah & vice versa
* https://gist.github.com/845309
*
* Copyright 2011-2012, Faisalman
* Licensed under The MIT License
* http://www.opensource.org/licenses/mit-license
@hendisantika
hendisantika / README.md
Created September 6, 2020 03:29 — forked from tombigel/README.md
How to Change Open Files Limit on OS X and macOS Sierra (10.8 - 10.12)

How to Change Open Files Limit on OS X and macOS

This text is the section about OS X Yosemite (which also works for macOS Sierra) from https://docs.basho.com/riak/kv/2.1.4/using/performance/open-files-limit/#mac-os-x

The last time i visited this link it was dead (403), so I cloned it here from the latest snapshot in Archive.org's Wayback Machine https://web.archive.org/web/20170523131633/https://docs.basho.com/riak/kv/2.1.4/using/performance/open-files-limit/

Mac OS X

To check the current limits on your Mac OS X system, run:

@hendisantika
hendisantika / laravellocal.md
Created April 17, 2020 12:45 — forked from hootlex/laravellocal.md
Run laravel project locally

##Windows users:

cmder will be refered as console

##Mac Os, Ubuntu and windows users continue here:

  • Create a database locally named homestead utf8_general_ci
@hendisantika
hendisantika / ConcurrentHashMapVsSynchronizedMap.java
Created April 16, 2020 07:49
Concurrent HashMap Vs SynchronizedMap
package com.hendisantika.thread;
import java.util.Collections;
import java.util.HashMap;
import java.util.Hashtable;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.TimeUnit;
@hendisantika
hendisantika / .gitlab-ci.yml
Created April 7, 2020 06:27 — forked from daicham/.gitlab-ci.yml
A sample of .gitlab-ci.yml for a gradle project
image: java:8-jdk
stages:
- build
- test
- deploy
before_script:
# - echo `pwd` # debug
# - echo "$CI_BUILD_NAME, $CI_BUILD_REF_NAME $CI_BUILD_STAGE" # debug
@hendisantika
hendisantika / gist:9ab9ba7514befcb322501deee5accc2e
Created April 4, 2020 02:30 — forked from wrburgess/gist:5528649
Backup Heroku Postgres database and restore to local database

Grab new backup of database

Command: heroku pgbackups:capture --remote production

Response: >>> HEROKU_POSTGRESQL_COLOR_URL (DATABASE_URL) ----backup---> a712

Get url of backup download

Command: heroku pgbackups:url [db_key] --remote production

@hendisantika
hendisantika / BASE64DecodedMultipartFile.java
Created March 26, 2020 01:13 — forked from luanvuhlu/BASE64DecodedMultipartFile.java
convert byte data to MultipartFile in Spring MVC
import java.io.ByteArrayInputStream;
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.springframework.web.multipart.MultipartFile;
@hendisantika
hendisantika / .gitlab-ci.yml
Created July 4, 2019 02:28 — forked from superjose/.gitlab-ci.yml
This is an example of a .gitlab-ci.yml that is required for Continuous Integration on GitLab projects.
# Reference: https://www.exclamationlabs.com/blog/continuous-deployment-to-npm-using-gitlab-ci/
# GitLab uses docker in the background, so we need to specify the
# image versions. This is useful because we're freely to use
# multiple node versions to work with it. They come from the docker
# repo.
# Uses NodeJS V 9.4.0
image: node:9.4.0
# And to cache them as well.
@hendisantika
hendisantika / build.gradle
Created May 23, 2019 21:19
Gradle Plugin
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'no.nils:wsdl2java:0.10'
}
}
@hendisantika
hendisantika / StringCompare.md
Created May 7, 2019 23:57 — forked from Yengas/StringCompare.md
Java String comparison, differences between ==, equals, matches, compareTo

String Comparison

In this gist, i will try to explain you what is the main differences between known string comparison techniques and where to use them.

Explanation of methods

==

This is the main equality operator in Java. To summarize it, this method compares the left and right hands references to eachother and returns boolean. This means this operator returns true only if left and right variable both point at the same Object in the memory. As in most of the class comparisons, this operators is discouraged to use if you're not really intented to check if two variables point to same object.