Skip to content

Instantly share code, notes, and snippets.

Ary Wibowo nucreativa

Block or report user

Report or block nucreativa

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
nucreativa / gist:680660f2c418bbd1a04182f45514e3bb
Last active Nov 29, 2017
Install ElasticSearch on Debian 9 Fresh Installation
View gist:680660f2c418bbd1a04182f45514e3bb

Download and install the public signing key:

wget -qO - | sudo apt-key add -

You may need to install the apt-transport-https package on Debian before proceeding:

sudo apt-get install apt-transport-https

##If your vagrant stuck connection timeout retrying

rm .vagrant.d\insecure_private_key

##If your vagrant ask re-import box

vboxmanage list vms
nano .vagrant/machines/default/virtualbox/id
nucreativa / convert-date.php
Last active Jan 13, 2016
Function to convert date format
View convert-date.php
function convertDate($oldFormat, $newFormat, $date)
$myDateTime = DateTime::createFromFormat($oldFormat, $date);
return $myDateTime->format($newFormat);

To get last non-empty cell in a column

nucreativa / CSV2Array.php
Created Jan 11, 2016
PHP - One line to parse a CSV file into an array
View CSV2Array.php
$csv = array_map('str_getcsv', file('filename.csv'));
nucreativa /
Created Oct 14, 2015
One liner to stop / remove all of Docker containers


docker stop $(docker ps -a -q)


docker rm $(docker ps -a -q)

nucreativa / sqlsvr2k
Last active Apr 25, 2018
How to make connection SQL Server 2000 in PHP 5.4
View sqlsvr2k
nucreativa / spinner.html
Created May 26, 2015
Simple CSS Spinner
View spinner.html
<div class="spinner">
<div class="rect1"></div>
<div class="rect2"></div>
<div class="rect3"></div>
<div class="rect4"></div>
<div class="rect5"></div>
.spinner {
margin: 100px auto;
nucreativa / open-in-new-window.js
Last active Aug 29, 2015
How to open page in new window
View open-in-new-window.js
// You only need to add class "open-new-window" on link that you want to open in new window
// Function for open link in new browser window
.on('click', function () {
var url = $(this).attr('href'),
conf = "height=" + (window.screen.height * 0.9) + ",width=" + (window.screen.width * 0.9);, 'New Window', conf);
return false;
nucreativa / pph21.php
Last active Dec 27, 2017
Code Hitung PPH21
View pph21.php
echo "\n";
echo "Berapa pendapatan (gaji dan lainnya) Anda per bulan? ";
$handle = fopen ("php://stdin","r");
$gaji = fgets($handle);
echo "Berapa pengeluaran (asuransi, jamsostek, dll) Anda per bulan? ";
$handle = fopen ("php://stdin","r");
$pengurangan = fgets($handle) ? : 0;
echo "Berapa bonus dan THR Anda peroleh dalam setahun? ";
$handle = fopen ("php://stdin","r");
You can’t perform that action at this time.