Skip to content

Instantly share code, notes, and snippets.

@jayu108
jayu108 / index.html
Last active May 22, 2023 14:53
index.html ==> frontend ; index.js + package.json ==> nodejs server -- single image file upload
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<script src="https://unpkg.com/axios/dist/axios.min.js"></script>
</head>
@jayu108
jayu108 / Task_Delay_test1.cs
Created February 5, 2021 02:10
Task.Delay 사용과 UI blcok 관계
using System;
using System.Diagnostics;
using System.Threading;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace Task_Delay_test1
{
public partial class Form1 : Form
{
@jayu108
jayu108 / app.js
Last active January 1, 2021 03:12
Ubuntu 18.04 LTS 서버에 Let's Encrypt 인증서 설치후, nodejs express 에서 , https 서버 만들기 (http 서버도 포함됨)
'use strict';
const fs = require("fs");
const http = require("http");
const https = require("https");
const express = require("express");
const app = express(); // https
const app2 = express(); // http
// yourdomain.com 은 실제로 사용중인 도메인으로 바꿔야함. -- Let's Encrypt 인증서 설치시 위치 사용.
@jayu108
jayu108 / datagridview_test2_attribute.cs
Last active October 30, 2020 04:25
C# -- DataGridView 와 List 연동시, data class 의 property 에 attribute 사용하여, 이름바꾸거나 숨기기.
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Diagnostics;
using System.Windows.Forms;
namespace datagridview_test2_attribute
{
public partial class Form1 : Form
{
@jayu108
jayu108 / doublebufferExt.cs
Last active September 23, 2020 02:34
C# -- listview, panel 에서 double buffered, ResizeRedraw Extension 사용한 example code ( Reflection 이용)
using System.Reflection; // 반드시 필요함.
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
this.SetStyle(ControlStyles.ResizeRedraw, true);
this.listView1.DoubleBuffered(true); // DoubleBuffered Extension 사용
@jayu108
jayu108 / customPopupListBox.cs
Created September 16, 2020 13:32
custom popup listbox window
using System;
using System.Drawing;
using System.Windows.Forms;
namespace customPopupListBox
{
public partial class Form1 : Form
{
ListBox listBox1 = new ListBox();
@jayu108
jayu108 / listbox_deselect.cs
Created August 17, 2020 06:51
C# -- listbox 에서 선택해제하기 (deselect)
using System;
using System.Windows.Forms;
namespace listbox_deselect
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
@jayu108
jayu108 / Base64Converter.cs
Created July 25, 2020 01:47
C# -- string 을 base64 string 으로 만들기
using System;
using System.Text;
namespace Test
{
public class Base64Converter
{
public static string GetUTF8Base64String(string username, string password)
{
string txt = username + ":" + password;
@jayu108
jayu108 / index.js
Created February 11, 2020 02:13
sequelize 접속 test 예제 ( mysql 접속하기 , database=testdb, username=park, password=1234 인 경우)
const Sequelize = require('sequelize')
// const sequelize = new Sequelize('mysql://park:1234@localhost:3306/testdb')
const sequelize = new Sequelize('testdb', 'park', '1234', {
host: '127.0.0.1',
dialect: 'mysql', // 'mariadb' | 'postgres' | 'mssql'
port: 3306,
pool: {
max: 90,
@jayu108
jayu108 / DataGridView_VirtualMode_JIT_data_loading.cs
Created December 20, 2019 07:49
C# -- datagridview 에서 just-in-time data loading 이용하여, virtual mode 사용하기
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Data.SqlClient;
using System.Diagnostics;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;