Skip to content

Instantly share code, notes, and snippets.

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

Hilman Nihri hyhilman

🏠
Working from home
View GitHub Profile
sudo iptables -I OUTPUT -m owner --uid-owner hilman -j DROP
sudo iptables -I OUTPUT -p udp --dport 53 -j ACCEPT -m owner --uid-owner hilman
sudo iptables -I OUTPUT -p tcp --dport 53 -j ACCEPT -m owner --uid-owner hilman
sudo iptables -I OUTPUT -p udp --dport 25 -j ACCEPT -m owner --uid-owner hilman
sudo iptables -I OUTPUT -p tcp --dport 25 -j ACCEPT -m owner --uid-owner hilman
sudo iptables -I OUTPUT -p udp --dport 465 -j ACCEPT -m owner --uid-owner hilman
sudo iptables -I OUTPUT -p tcp --dport 465 -j ACCEPT -m owner --uid-owner hilman
sudo iptables -I OUTPUT -p udp --dport 587 -j ACCEPT -m owner --uid-owner hilman
sudo iptables -I OUTPUT -p tcp --dport 587 -j ACCEPT -m owner --uid-owner hilman
sudo iptables -I OUTPUT -p udp --dport 993 -j ACCEPT -m owner --uid-owner hilman
@hyhilman
hyhilman / gist:8064cafef6ec5a4b5ab3e54e9217929c
Created February 8, 2023 06:47
install kube adm ubuntu
wget https://github.com/containerd/containerd/releases/download/v1.6.2/containerd-1.6.2-linux-amd64.tar.gz
sudo tar Czxvf /usr/local containerd-1.6.2-linux-amd64.tar.gz
sudo mv containerd.service /usr/lib/systemd/system/
wget https://raw.githubusercontent.com/containerd/containerd/main/containerd.service
sudo mv containerd.service /usr/lib/systemd/system/
sudo systemctl daemon-reload
sudo systemctl enable --now containerd
sudo systemctl status containerd
@hyhilman
hyhilman / json2csv.py
Last active August 13, 2018 07:24
convert traffik from json files which generates from pcap to csv
import json
import pandas as pd
import sys
import glob, os
def jsonToDataframe(file):
classify = file.replace(".json","")
print("Reading", file)
with open(file, 'r') as f:
json_buff = json.load(f)
@hyhilman
hyhilman / coap.js
Created May 7, 2018 13:46
simple coap handling when server is down(timeout)
var sensorLib = require("node-dht-sensor");
var temp = {
read: function() {
var a = sensorLib.read(11,4);
return a.temperature.toFixed(1);
}
};
var hum = {
read: function() {
var b = sensorLib.read(11,4);
@hyhilman
hyhilman / tugas2_aodv.cc
Last active December 15, 2017 22:22
Aodv routing with randomwalk mobility, CBR data sending, netflowmonitoring, and routing table export
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
* Copyright (c) 2009 IITP RAS
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation;
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
@hyhilman
hyhilman / classicalcryptography.m
Last active October 2, 2017 15:41
Classical Cryptography
a
@hyhilman
hyhilman / readme.md
Last active May 7, 2021 14:38
gdal-bin centos 7

How to install ogr2ogr from source on CentOS (RHEL)

Install the following packages:

yum install gcc-c++
yum install gcc
yum install libpng
yum install libtiff

Build latest proj4

@hyhilman
hyhilman / CaisarCipher.m
Last active September 13, 2017 12:20
Caisar Cipher Text Matlab
alfabet = "abcdefghijklmnopqrstuvwxyz"
alfabet = [alfabet, upper(alfabet), ' ']
plain = 'Aku makan es krim'
plainafterdecode = ''
key = 33
cipher = ''
modulus = length(alfabet)
for plainsequence = 1:length(plain)
for alfabetsequence = 1:length(alfabet)
@hyhilman
hyhilman / CaisarCipher_CaisarCipher.py
Last active September 11, 2017 16:43
Caisar Cipher Python
class CaisarCipher:
def __init__(self, plain):
self.plain = plain
def encode(self, key):
cipher = ''
for c in self.plain:
decimalstring = self.hexToDecimal(self.charToHex (c))
decimalstring = ( decimalstring + key ) % 256
cipher = cipher + self.hexToChar(self.decimalToHex(decimalstring))
@hyhilman
hyhilman / readme.md
Last active June 20, 2017 00:04
Multimedia Networking - Darwin Streaming Server

Darwing Streaming Server

Pull docker images

$ docker pull gaiterjones/darwin-streaming

Running docker

$ docker run -it -p 1220:1220 -p 8000:8000 -p 7070:7070 -p 8001:8001 -p 554:554 gaiterjones/darwin-streaming

Change admin password (when default admin/password user can't be used)

Note : run this command inside docker container