This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# isi dgn nama interface | |
:local interface "ovpn-client" | |
# isi dgn ip netwatch | |
:local ip "192.168.195.1" | |
:if ([/ping $ip count=5] = 0) do { | |
:log warning "Interface $interface is restarting" | |
/interface disable $interface | |
:delay 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# skrip otomatis hapus jika ada settingan lama | |
/tool netwatch remove [find comment="MyTunnel-DNS"] | |
/ip firewall nat remove [find comment="MyTunnel-DNS"] | |
/ip firewall mangle remove [find comment="MyTunnel-DNS"] | |
/ip route remove [find comment="MyTunnel-DNS"] | |
/interface ovpn-client remove [find comment="MyTunnel-DNS"] | |
/interface sstp-client remove [find comment="MyTunnel-DNS"] | |
/interface l2tp-client remove [find comment="MyTunnel-DNS"] | |
/interface pptp-client remove [find comment="MyTunnel-DNS"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$n = 5; | |
for($i=1;$i<=$n;$i++) { | |
for($j=1;$j<=$i;$j++) echo "*"; | |
echo "\n"; | |
} | |
/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
dd if=/dev/zero of=/swapfile bs=2048 count=524288 | |
chmod 0600 /swapfile | |
chown root:root /swapfile | |
mkswap /swapfile | |
swapon /swapfile | |
echo "/swapfile swap swap defaults 0 0" >> /etc/fstab |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ln -fs /usr/share/zoneinfo/Asia/Jakarta /etc/localtime |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
:local curDNS [/ip dns get server] | |
:local gwDNS "192.168.2.1" | |
:local aghDNS "192.168.2.230" | |
:local oriDNS "8.8.8.8,8.8.4.4" | |
:local testDomain "www.google.com" | |
:local isDown "no" | |
:if ($curDNS = $aghDNS) do={ | |
:do { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
:local namahost $"lease-hostname" | |
:local status | |
:local pesan | |
:if ($leaseBound = 0) do={ :set status "Logout" } else={ :set status "Login" } | |
:set pesan "$status - $leaseServerName - $leaseActIP - $namahost" | |
:log warning "$pesan" | |
:if ($leaseBound = 0) do={ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/queue simple remove [find dynamic=yes name~"pppoe-"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/system/device-mode/update container=yes | |
/interface veth add address=172.17.0.1/24 gateway=172.17.0.254 name=agh | |
/interface bridge add name=dockers | |
/interface bridge port add bridge=dockers interface=agh | |
/ip address add address=172.17.0.254/24 interface=dockers network=172.17.0.0 | |
/ip firewall nat add action=masquerade chain=srcnat | |
/container config set registry-url=https://registry-1.docker.io tmpdir=/disk1/tmp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
int main(void) | |
{ | |
int n,i,j,x; | |
printf("Enter an integer: "); | |
scanf("%d", &n); | |
for(i=1;i<=n;i++) { |
OlderNewer