Skip to content

Instantly share code, notes, and snippets.

View Loetfi's full-sized avatar
🎯
Focusing

Loetfi Loetfi

🎯
Focusing
View GitHub Profile
@Loetfi
Loetfi / hello-world.json
Created November 23, 2022 16:05
hello world
{
"say" : "hello"
}
{
"status": 1,
"message": "Sukses",
"data": {
"system_message": "SUCCESS",
"response": {
"additionaldata": [],
"billdetails": [
{
"adminfee": "0.0",
@Loetfi
Loetfi / package.json
Created November 2, 2020 13:50 — forked from tpai/package.json
A web crawler sample based on nightwatch.
{
"name": "nightwatch_webcrawler",
"description": "A web crawler sample based on nightwatch.",
"version": "0.0.1",
"author": {
"name": "tonypai",
"email": "tony77794@gmail.com"
},
"homepage": "http://github.com/tpai",
"dependencies": {
@Loetfi
Loetfi / NewMessage.php
Created October 26, 2019 08:50 — forked from sebastiaanluca/NewMessage.php
Laravel + Redis + NodeJS + Socket.io pub/sub secure server and client supporting multiple rooms, channels, users, … Add `client.js` to your client app, run `node server.js`, and trigger the Laravel event any way you want to broadcast the data.
<?php
namespace App\Events;
use Illuminate\Contracts\Broadcasting\ShouldBroadcast;
use Illuminate\Queue\SerializesModels;
class NewMessage extends Event implements ShouldBroadcast
{
@Loetfi
Loetfi / notify.go
Created July 15, 2019 10:45
notify
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\Helpers\Api;
use App\Helpers\RestCurl;
use App\Helpers\Doku;
use App\Models\DokuModel;
use App\Models\DokuLogModel as DokuLog;
@Loetfi
Loetfi / airports.json
Created May 15, 2019 13:16 — forked from tdreyno/airports.json
JSON data for airports and their locations
This file has been truncated, but you can view the full file.
[
{
"code": "AAA",
"lat": "-17.3595",
"lon": "-145.494",
"name": "Anaa Airport",
"city": "Anaa",
"state": "Tuamotu-Gambier",
"country": "French Polynesia",
"woeid": "12512819",
@Loetfi
Loetfi / solutioning_mas_juned.php
Last active February 20, 2019 09:07
monggo di liat mas
<?php
function selisihHari($tglAwal, $tglAkhir){
// list tanggal merah selain hari minggu
$tglLibur = array(
"2019-02-02",
"2019-02-03",
"2019-02-05",
"2019-02-07",
"2019-02-09",
{
"20180101": {
"deskripsi": "Hari Tahun Baru",
"dibuat": "20170926T230321Z",
"dimodifikasi": "20170926T230321Z",
"status": "CONFIRMED"
},
"20180216": {
"deskripsi": "Tahun Baru Imlek",
"dibuat": "20170926T230321Z",
<?php
// nanti ambil dari adms menggunakan curl
$dari_ims = '{"draw":2,"recordsTotal":320,"recordsFiltered":320,"data":[["10","<a href=\"map_lot_list_detail.php?id=3218&item=38580\">\r\n\t\t\t\t\t\t<image width=\"60%\" src=\"http:\/\/103.7.1.36\/blue-t\/ImageShare\/38580\/img\/photo\/1.jpg\"><\/a>","MEDAN","BK1896DU","2017","TOYOTA CALYA 1.2 G MINIBUS MT","09-05-2018<br>0","SILVER METALIK","BENSIN","E","0"],["42","<a href=\"map_lot_list_detail.php?id=3218&item=38564\">\r\n\t\t\t\t\t\t<image width=\"60%\" src=\"http:\/\/103.7.1.36\/blue-t\/ImageShare\/38564\/img\/photo\/1.jpg\"><\/a>","MEDAN","BK1997PJ","2016","DAIHATSU XENIA 1.3 X MINIBUS MT","09-05-2018<br>35,496","HITAM METALIK","BENSIN","B","0"],["41","<a href=\"map_lot_list_detail.php?id=3218&item=39300\">\r\n\t\t\t\t\t\t<image width=\"60%\" src=\"http:\/\/103.7.1.36\/blue-t\/ImageShare\/39300\/img\/photo\/1.jpg\"><\/a>","MEDAN","BK1006DP","2017","TOYOTA AVANZA 1.3 G GRAND MINIBUS MT","09-05-2018<br>10,160","HITAM METALIK","BENSIN","B","0"],["40","<