Skip to content

Instantly share code, notes, and snippets.

Avatar
🏋️
Awali dengan basmalah..

Muhammad Ichsanul Fadhil ichsanputr

🏋️
Awali dengan basmalah..
View GitHub Profile
View dfd
#include <ESP8266WiFi.h>
#include <PubSubClient.h>
// WiFi
const char *ssid = ""; // Enter your WiFi name
const char *password = ""; // Enter WiFi password
// MQTT Broker
const char *mqtt_broker = ""; // Enter your WiFi or Ethernet IP
const char *topic = "test/topic";
const int mqtt_port = 1883;
WiFiClient espClient;
View motor_esp32.ino
#include <WiFi.h>
#include <WebServer.h>
#define ENA 13
#define ENB 12
#define IN_1 32
#define IN_2 33
#define IN_3 34
#define IN_4 35
View chart.json
{
"data": [
{
"ketua": [
{
"id": 1,
"name": "Joko",
"category": "Ketua",
"summary": 1341
},
@ichsanputr
ichsanputr / fdfdf
Created January 24, 2023 13:56
fdf
View fdfdf
<html>
<style>
iframe {
width:1000px;
height:500px;
position:absolute;
top:0; left:0;
filter:alpha(opacity=10); /* in a real attack this would be opacity=0 */
opacity:0.1;
}
@ichsanputr
ichsanputr / mkdir.asm
Last active December 8, 2022 09:26
Create a directory using mkdir syscall with x64 assembly linux
View mkdir.asm
;compile and running using command below
;nasm -f elf64 -g -F dwarf -o a.o a.asm
;ld -o a a.o
global _start
section .data
pathDir db "dirTest",0
@ichsanputr
ichsanputr / rtctolcd.c
Created March 9, 2022 02:31
Display current date, hour, second with RTC and LCD Arduino
View rtctolcd.c
#include <Wire.h>
#include <LiquidCrystal_I2C.h>
#include <RTClib.h>
RTC_DS1307 rtc;
LiquidCrystal_I2C lcd(0x27,20,4);
void setup()
{
@ichsanputr
ichsanputr / halo.go
Created February 2, 2022 01:46
Salam
View halo.go
#include "RTClib.h"
#include <LiquidCrystal_I2C.h>
RTC_DS1307 rtc;
char daysOfTheWeek[7][12] = {"Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"};
LiquidCrystal_I2C lcd(0x27,20,4);
void setup () {
View helloworld.go
package helloworld
import "fmt"
func Print(){
fmt.Println("Hello World")
}
@ichsanputr
ichsanputr / main.go
Created November 21, 2021 09:40
simple web server using gin
View main.go
package main
import "github.com/gin-gonic/gin"
func main() {
r := gin.New()
r.GET("/", func(c *gin.Context) {
c.JSON(200, gin.H{
"nama": "ichsan",
})
@ichsanputr
ichsanputr / insertjsontoelasticseacrh.js
Created November 15, 2021 11:05
Node Js Script for add JSON to Elasticsearch database
View insertjsontoelasticseacrh.js
var {Client} =require('@elastic/elasticsearch');
var http = require('http');
var movies = require("./movies1.json")
var actors = require("./actors.json")
// connect to elastic
const client = new Client({
node: 'uri to post elasticseacrh',
auth: {
username: '1200',