Skip to content

Instantly share code, notes, and snippets.

View ad3n's full-sized avatar
🏠
Work From Home

Muhamad Surya Iksanudin ad3n

🏠
Work From Home
View GitHub Profile
@ad3n
ad3n / collections.json
Created August 21, 2019 09:56
Postman Test Collection
{
"info": {
"_postman_id": "8a23a3b2-39aa-4a4e-a4ee-8a099c1ac209",
"name": "CMS_ADMIN",
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
},
"item": [
{
"name": "Admin_Manage_Content",
"item": [
class TArrayAccess implements \ArrayAccess
{
private $arr;
public function offsetExists($offset)
{
return isset($this->arr[$offset]);
}
public function offsetGet($offset)
<?php
class PPH21Calculator
{
private function firstRule(float $pkp): float
{
if (0 < $pkp && 50000000 >= $pkp) {//0 - 50jt
return $pkp * 0.05;
}
@ad3n
ad3n / image-optimize.txt
Created February 7, 2017 03:52
Image Optimization
https://pngquant.org/
https://mozjpeg.codelove.de/binaries.html
@ad3n
ad3n / gist:1210b217eaa247e573ebfe041fb5669a
Created January 23, 2017 10:20 — forked from urbels/gist:9545586
Regular expression cheat sheet for Varnish
Regular expression cheat sheet for Varnish
Varnish regular expressions are NOT case sensitive. Varnish uses POSIX
regular expressions, for a complete guide, see: "man 7 regex"
Basic matching:
req.url ~ "searchterm"
True if req.url contains "searchterm" anywhere.
req.url == "searchterm"
@ad3n
ad3n / nginx.conf
Created January 18, 2017 08:44 — forked from plentz/nginx.conf
Best nginx configuration for improved security(and performance). Complete blog post here http://tautt.com/best-nginx-configuration-for-security/
# to generate your dhparam.pem file, run in the terminal
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048
@ad3n
ad3n / openresty-ubuntu-install.sh
Last active January 24, 2017 03:26 — forked from alex-roman/openresty-ubuntu-install.sh
Easy install openresty (used and tested on Ubuntu 14.04, 15.10 and 16.04)
#!/bin/bash
apt-get -y update
apt-get -y install nginx-extras build-essential libpcre3-dev libssl-dev libgeoip-dev libpq-dev libxslt1-dev libgd2-xpm-dev
wget -c https://openresty.org/download/openresty-1.9.15.1.tar.gz
tar zxvf openresty-1.9.15.1.tar.gz
cd openresty-1.9.15.1
./configure \
--sbin-path=/usr/sbin/nginx \
--conf-path=/etc/nginx/nginx.conf \
Your Telegram History
03.10.2016 17:00:15, Nur Rahmat Taufik(you): undefined
03.10.2016 17:16:40, Muhammad Surya: selamat datang semuanya 😊
03.10.2016 17:30:04, Muhammad: undefined
03.10.2016 17:30:10, Muhammad: Tes
03.10.2016 17:30:30, Muhammad Surya: Makin rame
03.10.2016 17:30:41, Muhammad Surya: tersisa 10 quota lagi :D
03.10.2016 17:30:50, Muhammad Surya: 5 dari luar 5 dari komunitas
03.10.2016 17:31:03, Muhammad: Seeeppp👍
@ad3n
ad3n / segitiga.php
Created July 17, 2016 15:25
Segitiga Plain
<?php
$limit = 7;
for ($i = 1; $i < $limit; $i++) {
for ($j = ($limit - $i); $j >= 0; $j--) {
echo ' ';
}
$flag = true;
@ad3n
ad3n / segitiga-angka.php
Last active July 17, 2016 15:16
Print segitiga Angka bolak balik
<?php
class Segitiga
{
private $limit;
public function setLimit($limit)
{
$this->limit = $limit;
}