View main.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* get current ip address | |
* as a replacment for command ifconfig (linux ubuntu) | |
**/ | |
package main | |
import ( | |
"fmt" | |
"os/exec" |
View insertjsontoelasticseacrh.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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', |
View main.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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", | |
}) |
View helloworld.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package helloworld | |
import "fmt" | |
func Print(){ | |
fmt.Println("Hello World") | |
} |
View halo.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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 rtctolcd.c
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <Wire.h> | |
#include <LiquidCrystal_I2C.h> | |
#include <RTClib.h> | |
RTC_DS1307 rtc; | |
LiquidCrystal_I2C lcd(0x27,20,4); | |
void setup() | |
{ |
View mkdir.asm
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;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 |
View fdfdf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<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; | |
} |
View chart.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"data": [ | |
{ | |
"ketua": [ | |
{ | |
"id": 1, | |
"name": "Joko", | |
"category": "Ketua", | |
"summary": 1341 | |
}, |
View motor_esp32.ino
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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 |
OlderNewer