Skip to content

Instantly share code, notes, and snippets.

View x3r0s's full-sized avatar
🏠
Working from home

David Kim x3r0s

🏠
Working from home
View GitHub Profile
@x3r0s
x3r0s / BadUSB.ino
Last active November 16, 2021 03:19
Arduino Leonardo Bad USB Sample
#include "Keyboard.h"
void typeKey(int key)
{
Keyboard.press(key);
delay(50);
Keyboard.release(key);
}
/* Init function */
@x3r0s
x3r0s / reset.css
Created August 3, 2021 16:26
reset.css
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed,
@x3r0s
x3r0s / center.css
Last active December 14, 2021 04:32
center css
/* 부모 밑의 자식 div를 부모의 전체넓이를 기준으로 중앙정렬 할 때 */
.target {
position: relative;
top: 50%;
left: 50%;
margin: 0 0 0 -480px;
width: 960px;
}
/* 콘텐츠 컨테이너 영역을 정렬할 때 사용함 */
@x3r0s
x3r0s / gl-Material-icons.html
Created November 22, 2021 01:21
Google Material Icons
<link href="https://fonts.googleapis.com/css?family=Material+Icons|Material+Icons+Outlined|Material+Icons+Two+Tone|Material+Icons+Round|Material+Icons+Sharp" rel="stylesheet">
<!-- import any icon from here -->
<!-- https://fonts.google.com/icons -->
<span class="material-icons-outlined">done</span>
@x3r0s
x3r0s / noBlankBetweenImg.css
Created November 22, 2021 05:30
<img>, <br> 태그 여백 제거 css
.target li br {
content: "";
display: block;
margin-bottom: -4px;
}
.target li img{
width:100%;
border:0;
}
@x3r0s
x3r0s / sharphr.css
Created November 24, 2021 08:41
sharp <hr> tag
hr {
border-width:1px 0px 0px 0px;
border-style:solid;
border-color:#808080;
opacity: 0.3;
height:1px;
}
@x3r0s
x3r0s / common.css
Last active December 3, 2021 07:19
no-drag.css
/* 글씨 드래그를 막아주는 css */
.no-drag {
-ms-user-select: none;
-moz-user-select: -moz-none;
-khtml-user-select: none;
-webkit-user-select: none;
user-select: none;
}
@x3r0s
x3r0s / index.html
Created December 3, 2021 07:20
Search bar with search icon
<!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>
<link rel="stylesheet" href="style.css" />
</head>
@x3r0s
x3r0s / shuffle.js
Created January 6, 2022 08:45
JavaScript Shuffle Prototype
// https://im-first-rate.tistory.com/35?category=827433
// Array의 prototype을 지정해주고, shuffle이라는 이름을 가진 함수를 생성
Array.prototype.shuffle = function () {
var length = this.length;
// 아래에서 length 후위 감소 연산자를 사용하면서 결국 0이된다.
// 프로그래밍에서 0은 false를 의미하기에 0이되면 종료.
while (length) {
@x3r0s
x3r0s / PM2-Command.md
Created February 8, 2022 16:53
PM2 Command

Change Process name

pm2 restart {id} --name {New name}