Skip to content

Instantly share code, notes, and snippets.

View turahe's full-sized avatar

Nur Wachid turahe

View GitHub Profile
@turahe
turahe / NumberFormat.php
Last active October 23, 2020 07:47
Number format for price
<?php
/**
* Numbers more readable for humans
*
* It intends to change numbers as 1000 as 1K or 1200000 as 1.2M
*
* This code is heavly base in this one: https://gist.github.com/RadGH/84edff0cc81e6326029c
*
* How to use \NumberFormat::readable(1000);
*/
@turahe
turahe / docker-php-ext-install.md
Created June 2, 2020 22:16 — forked from giansalex/docker-php-ext-install.md
docker-php-ext-install Reference
RUN apt update
RUN apt upgrade -y
RUN apt install -y apt-utils
RUN a2enmod rewrite
RUN apt install -y libmcrypt-dev
RUN apt install -y libicu-dev
RUN docker-php-ext-install -j$(nproc) intl
RUN apt-get install -y libfreetype6-dev libjpeg62-turbo-dev libpng12-dev
RUN docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ 
@turahe
turahe / install.sh
Created March 15, 2020 22:59
Install server LEMP
##################################################################
#!/bin/bash
# update the sources
sudo apt update
sudo apt upgrade -y
sudo apt autoremove -y
echo "::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::updated apt repos"
sleep 2
@turahe
turahe / preview.md
Last active October 22, 2019 14:32
Embedded File Viewer: Google Drive, OneDrive

Office Web Apps Viewer

('.ppt' '.pptx' '.doc', '.docx', '.xls', '.xlsx')

http://view.officeapps.live.com/op/view.aspx?src=[OFFICE_FILE_URL]

<iframe src='https://view.officeapps.live.com/op/embed.aspx?src=[OFFICE_FILE_URL]' width='px' height='px' frameborder='0'>
</iframe>

OneDrive Embed Links

@turahe
turahe / .conkyrc2
Last active February 24, 2019 05:23
my conky config
-- vim: ts=4 sw=4 noet ai cindent syntax=lua
conky.config = {
alignment = 'top_left',
background = false,
border_width = 0.5,
cpu_avg_samples = 4,
default_color = 'white',
default_outline_color = 'grey',
@turahe
turahe / dot.inputrc
Last active May 8, 2018 02:28
terminal config
# do not bell on tab-completion
set bell-style none
set meta-flag on
set input-meta on
set convert-meta off
set output-meta on
$if mode=emacs
# for linux console and RH/Debian xterm