Skip to content

Instantly share code, notes, and snippets.

View un-ro's full-sized avatar
😕
¯\_(ツ)_/¯

Unero un-ro

😕
¯\_(ツ)_/¯
View GitHub Profile
-- CHECK DATE
SELECT CURDATE();
-- SITEMAP AUTO 100%
INSERT INTO tbl_counter
VALUES
(0, 65, "ACEH", 1, CURDATE()),
(0, 65, "BALI", 1, CURDATE()),
(0, 65, "BANTEN", 1, CURDATE()),
(0, 65, "BENGKULU", 1, CURDATE()),
// Fizz Buzz
fun fizzBuzz(start: Int, end: Int){
for (i in start..end) {
if ((i % 3 == 0) && (i % 5 == 0)) {
print("Fizz Buzz, ")
} else if (i % 3 == 0) {
print("Fizz, ")
} else if (i % 5 == 0) {
print("Buzz, ")
} else {
@un-ro
un-ro / import.txt
Created October 17, 2020 22:00
wg-manjaro-cli-import
nmcli connection import type wireguard file /etc/wireguard/wg0.conf
@un-ro
un-ro / foo.py
Last active March 3, 2021 02:40
GOD DAMN RECURSION
# Fix: RecursionError
def foo(x):
if(x < 1):
print("Done")
else:
foo(x-1)
@un-ro
un-ro / pattern.cpp
Created August 26, 2020 06:30
KMIPN 2020 Internal - JTI Polinema
// CHARACTER PATTERN
#include<iostream>
int main(){
int t,l,c,j=0,i=0;
scanf("%d",&t);
while(t--){
scanf("%d %d",&l,&c);
for(i=0;i<=(l*2);i++){
// KOLOM
@un-ro
un-ro / wireguard.conf
Created August 20, 2020 02:26
Wireguard VPN config file template for client.
# Interface and Peer are using server configuration
# PrivateKey, PublicKey, Address, MTU, Endpoint are from server. Connection will fail if not match.
# DNS, AllowedIPs, PersistentKeepalive are configurable as you know what to do.
# VPN use 0.0.0.0 to block all conenction from 1st connection (Ethernet / Internet)
[Interface]
PrivateKey =
Address =
DNS = 8.8.8.8,8.8.4.4,2001:4860:4860::8888,2001:4860:4860::8844
MTU =
@un-ro
un-ro / index.html
Created January 5, 2020 01:50
Testing Apache server
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta http-equiv="X-UA-Compatible" content="ie=edge" />
<title>Welcome</title>
</head>
<body>
<h2>Welcome to my Web Server test page</h2>
package minggu8;
import java.util.Scanner;
public class TestStack {
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
System.out.print("Masukkan jumlah tumpukan: ");
int total = sc.nextInt();
Stack stack = new Stack(total);
int option = 0;
@un-ro
un-ro / HollyMolly.java
Created March 10, 2019 12:28
My Java Code!
class HollyMolly{
public static void main(String[] args){
System.out.println("");
}
}