Skip to content

Instantly share code, notes, and snippets.

View kamalhm's full-sized avatar
👋
Hey there

Kamal Mahmud kamalhm

👋
Hey there
View GitHub Profile
robots.map((user, i) => {
return (
<Card
key={i}
id={robots[i].id}
name={robots[i].name}
email={robots[i].email}/>
);
import zmq
PORT = '4545'
IP = '10.30.0.25'
context = zmq.Context()
print("Menghubungkan ke server...")
socket = context.socket(zmq.REQ)
socket.connect("tcp://{ip}:{port}".format(ip=IP, port=PORT))
tambah = input(
"Terhubung dengan server, apakah anda ingin mengirim pesan ? y/n \n")
if tambah == 'y':
# Fig. 19.15: fig19_15.py
# Event objects.
import threading
import random
import time
class VehicleThread(threading.Thread):
"""Class representing a motor vehicle at an intersection"""
@kamalhm
kamalhm / FE_Javascript.html
Created August 10, 2019 10:00
FE_Javascript
function appendChildren(decorateDivFunction) {
var allDivs = [...document.getElementsByTagName("div")];
for (var i = 0; i < allDivs.length; i++) {
var newDiv = document.createElement("div");
decorateDivFunction(newDiv);
allDivs[i].appendChild(newDiv);
}
}
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Modal Dialog</title>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js"></script>
</head>
@kamalhm
kamalhm / How to install NVM on ZSH
Created August 29, 2019 15:13
Step to install NVM on ZSH
# Find the latest version on https://github.com/creationix/nvm#install-script
# Install it on bash first
$ curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.34.0/install.sh | bash
# Add in your ~/.zshrc the following:
export NVM_DIR=~/.nvm
[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh"
@kamalhm
kamalhm / find_and_move.bat
Created October 3, 2019 07:42
Windows: Command to find all mkv in subfolder and move them
for /r "C:\Users\KHM\Downloads\" %x in (*.mkv) do move "%x" "C:\Users\KHM\Downloads\familyguy\"
@kamalhm
kamalhm / profiles.json
Created May 11, 2020 22:07
Windows Terminal Settings
// To view the default settings, hold "alt" while clicking on the "Settings" button.
// For documentation on these settings, see: https://aka.ms/terminal-documentation
{
"$schema": "https://aka.ms/terminal-profiles-schema",
"defaultProfile": "{07b52e3e-de2c-5db4-bd2d-ba144ed6c273}",
"profiles":
@Value
@Builder
public class Member {
@Id
private Long id;
private String name;
}
@SpringBootApplication
public class ReactivePostgresApplication {
public static void main(String[] args) {
SpringApplication.run(ReactivePostgresApplication.class, args);
}
}