Skip to content

Instantly share code, notes, and snippets.

View adinata-id's full-sized avatar

Adinata adinata-id

View GitHub Profile
@adinata-id
adinata-id / bwtest.txt
Last active January 1, 2025 17:13
Public Bandwith Test Mikrotik
New Bandwith test Publik (Datacenter JKT)
IP Address : 103.161.184.37
username : mid
password : midtest
@adinata-id
adinata-id / gist:e2ce818940b0ccd3c194b985b05434f1
Created September 24, 2021 03:18
Script Backup Config Mikrotik
/system backup save name=Router-ANDA;
/tool e-mail send to="[email protected]" subject="Router-ANDA-Backup" body="Backup Router ANDA" file="Router-ANDA.backup" start-tls=yes;
@adinata-id
adinata-id / gist:fd98a9367dc0ceceb98b7b36ffbacfd6
Created September 24, 2021 03:24
Create Multiple Ping DI Windows
//untuk satu window gunakan script dibawah :
@echo off
ping 8.8.8.8
Echo ...................................
ping www.detik.com
Echo ...................................
ping www.yahoo.com
@adinata-id
adinata-id / gist:26162c656ef72cb7cf8b6927e18a06af
Created December 4, 2021 08:20
Return Sitemap XML File Using Laravel
Route::get('/sitemap.xml', function () {
$content = Storage::disk('digitalocean')->url('sitemap.xml');
return response(file_get_contents($content), 200, [
'Content-Type' => 'application/xml'
]);
});
:local ip "192.168.208.1"
:local interface "MID VPN INTERFACE NAME"
:if ([/ping $ip count=5] = 0) do {
:log warning "MID TEKNOLOGI VPN is restarting"
/interface disable $interface
:delay 1
/interface enable $interface
}
@adinata-id
adinata-id / ModelResource.php
Created December 27, 2021 02:17 — forked from bezhanSalleh/ModelResource.php
Filament Dynamic UI for Role and Permissions | Toggel + Checkboxes
public static function form(Form $form): Form
{
return $form
->schema([
Forms\Components\Grid::make()
->schema([
Forms\Components\Card::make()
->schema([
Forms\Components\TextInput::make('name')
->required()
//tambahkan pada AppService Provider
Str::macro('readDuration', function (...$text) {
$totalWords = str_word_count(implode(" ", $text));
$minutesToRead = round($totalWords / 200);
return (int)max(1, $minutesToRead);
});
//implementasi pada laravel blade
if (Cache::has('article:slug:' . $slug)) {
$blog = Cache::get('article:slug:' . $slug);
} else {
$blog = Article::where('slug', $slug)->first();
Cache::put('article:slug:' . $slug, $blog, $seconds = 600);
}
return $this->article = $blog;
@adinata-id
adinata-id / gist:cddbc9d26824c216ff3b9fb3b1f59fa5
Created January 29, 2022 02:24
Cara Uninstall Microsoft Edge Di Windows
Cek versi microsoft edge anda dengan cara :
klik browser setting
pilih Help & feedback->dan klik About Microsoft Edge.
catat versi microsoft edge misalnya : 97.0.1072.76
setelah itu buka command promopt ( CMD ) run as administrator
ingat disini kita run cmd sebagai administrator
lalu ketik : cd %PROGRAMFILES(X86)%\Microsoft\Edge\Application\VersiMicrosoftEdge\Installer
contohnya sbb :
@adinata-id
adinata-id / gist:c316c84450dc48931606521211614e32
Created January 31, 2022 05:20
raw untuk static routing
# jan/31/2022 12:20:23 by RouterOS 6.49.2
# software id = AD68-8HRQ
#
# model = RB4011iGS+
# serial number = F0260E809EDC
/ip firewall raw
add action=add-dst-to-address-list address-list=MARKETPLACE \
address-list-timeout=1d chain=prerouting comment=MARKETPLACE content=\
tokopedia.com dst-address-list=!lokal src-address-list=lokal
add action=add-dst-to-address-list address-list=MARKETPLACE \