Skip to content

Instantly share code, notes, and snippets.

View heerdyes's full-sized avatar

Heerdyes Mahapatro heerdyes

View GitHub Profile
@heerdyes
heerdyes / digiclk.py
Created October 13, 2023 05:08
digital clock
import time
# number chart
zero = [
[' ', '_', '_', ' '],
['|', ' ', ' ', '|'],
['|', '_', '_', '|'],
[' ', ' ', ' ', ' ']
]
@heerdyes
heerdyes / arrays00.java
Created September 29, 2023 07:09
java_snippets
import java.io.Console;
public class arrays00 {
public static void main(String[] args) {
int[] a = new int[] { 11, 55, 73, 29 };
int i = 0;
while(i < a.length) {
System.out.println(a[i]);
i++;
}
@heerdyes
heerdyes / App.js
Last active September 7, 2023 05:07
import { useState } from 'react';
import './App.css';
function App() {
const [skey, setSkey] = useState('');
const [links, setLinks] = useState([]);
return (
<div>
<h1>hello react</h1>
@heerdyes
heerdyes / frontend.html
Created August 1, 2023 19:03
frontend html
<html>
<head>
<title>frontend</title>
<style>
table {
border-collapse: collapse;
}
tr, td {
border: 1px solid darkgreen;
}
@heerdyes
heerdyes / backend.js
Created August 1, 2023 19:02
express js backend
const express = require('express');
const app = express();
const port = 3000;
let kvs = [
{
ccode: 'JS101',
cname: 'javascript fundamentals'
},
{
@heerdyes
heerdyes / prxysrvr.js
Created August 1, 2023 16:16
node proxy server
const http = require('http');
const httpProxy = require('http-proxy');
const proxy = httpProxy.createProxyServer({});
const apisrv = '127.0.0.1:8080';
const port = 3000;
console.log(`[proxy] 127.0.0.1:${port} -> ${apisrv}`);
http.createServer(
function(req, res) {