Skip to content

Instantly share code, notes, and snippets.

View adxio's full-sized avatar

Andi Kurniawan adxio

  • Yogyakarta, Indonesia
View GitHub Profile
@adxio
adxio / recruitment_endpoint
Last active July 31, 2019 22:25
Recruitment Endpoint, Request and Response
// EXAMPLE
========================================
// Register [POST]
// Request
{
"user_name":"Testing",
"user_email":"test@tester.com"
}
// Response
@adxio
adxio / recruitment
Created July 31, 2019 11:53
Junior Developer Test
Endpoint :
http://recruitment.api.makekimia.network/api
Path :
* /register (Register) [POST]
Required :
user_name (text)
user_email (text)
Return :
@adxio
adxio / wa_rotator.html
Last active September 8, 2019 14:34
Simple rotator wa,
<html>
<div id="product_name">Kacamata</div>
<div id="product_group">Fashion</div>
<div id="product_id">10</div>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<script language="JavaScript">
var product_id = $('#product_id').text()
var product_name = $('#product_name').text()
var product_group = $('#product_group').text()
var phone = ['6281312020954','6281312020941','6281312020938']
@adxio
adxio / sample_query_nested_query.json
Last active September 15, 2017 05:06
Sample query nested query
{
"from": "0",
"query": {
"bool": {
"filter": {
"range": {
"updated": {
"gte": 1504844415000,
"lte": 1505449215000
}
@adxio
adxio / smaple_data_nested_query.json
Created September 15, 2017 04:56
Sample data nested query
{
"created": 1483922349000,
"price": 239000,
"retention": [{
"duration": 180,
"sold": 7,
"order": 7
},
{
"duration": 30,
@adxio
adxio / unblock
Last active July 14, 2017 18:01
Better live without blocking internet.
//Reddit
151.101.129.140 reddit.com
151.101.49.140 www.reddit.com
151.101.49.140 i.redditmedia.com
151.101.49.140 m.reddit.com
151.101.49.140 g.redditmedia.com
151.101.49.140 a.thumbs.redditmedia.com
151.101.193.140 redditgifts.com
151.101.49.140 i.redd.it
151.101.49.140 b.thumbs.redditmedia.com
@adxio
adxio / pagenation.php
Created October 20, 2015 15:32
Pagenation
<?php
$build = http_build_query($canonical,'','&');
$last = ceil( $jumlah / $limit );
$links = 3;
$start = ( ( $page - $links ) > 0 ) ? $page - $links : 1;
$end = ( ( $page + $links ) < $last ) ? $page + $links : $last;
if($page == 1){
print '<link rel="next" href="'.$canonical_url.'&page=' . ( $page + 1 ) . '" />';
}elseif ($page == $end) {
print '<link rel="prev" href="'.$canonical_url.'&page=' . ( $page - 1 ) . '" />';