Skip to content

Instantly share code, notes, and snippets.

View 0x00000FF's full-sized avatar
🛰️
Si vis pacem, para bellum

Kangjun Heo 0x00000FF

🛰️
Si vis pacem, para bellum
View GitHub Profile
-----BEGIN CERTIFICATE-----
MIIFzTCCA7WgAwIBAgIUN3NWWg8d/T5LaWQWp5iuGti/Y/wwDQYJKoZIhvcNAQEL
BQAwdjEkMCIGA1UEAwwbUHJveG1veCBWaXJ0dWFsIEVudmlyb25tZW50MS0wKwYD
VQQLDCQwMjNkMjEzYi1mNjcwLTQzNTQtYmFhMC0zYTdmMTFkZTdkMWExHzAdBgNV
BAoMFlBWRSBDbHVzdGVyIE1hbmFnZXIgQ0EwHhcNMjQwNzEwMTExNjU1WhcNMzQw
NzA4MTExNjU1WjB2MSQwIgYDVQQDDBtQcm94bW94IFZpcnR1YWwgRW52aXJvbm1l
bnQxLTArBgNVBAsMJDAyM2QyMTNiLWY2NzAtNDM1NC1iYWEwLTNhN2YxMWRlN2Qx
YTEfMB0GA1UECgwWUFZFIENsdXN0ZXIgTWFuYWdlciBDQTCCAiIwDQYJKoZIhvcN
AQEBBQADggIPADCCAgoCggIBANpTU0NztokHGiwXm6Z8U1+ezTpUthXLdLo9RLnt
Eld+9ln7jDTjM6fLvzYY1nG/xIqV+mwO3LyZ6Er4C4uy18XaKUlg6NhTc75BB5Tw
Matching IP Addresses (Sample Input 192.168.0.1, 14 Steps)
^(?:[0-9]{1,3}\.){3}[0-9]{1,3}$
Matching Email Addresses (Sample Input [email protected], 12 Steps)
^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$
Matching URLs (Sample Input https://example.com/exmple?a=1&b=1&c=1, 14 Steps)
^(?:https?|ftp):\/\/[^\s\/$.?#].[^\s]*$
#pronamaChan {
position: fixed;
bottom: 45px;
right: 120px;
opacity: .7;
z-index: 10;
}
#pronamaChan i {
display: block;
@0x00000FF
0x00000FF / GPS_Serial_TimeSync.cs
Created October 30, 2021 05:34
Time Sync with Serial GPS Module
private void SyncGPSTime()
{
if (!privileged)
privileged = EnableTimesync();
var time = new SYSTEMTIME();
var GPSSerial = new SerialPort()
{
PortName = setting.ports.gps,
BaudRate = 9600,
@0x00000FF
0x00000FF / github_webhook.php
Created July 5, 2021 03:33
PHP webhook for github
<?php
// utility
function rrmdir($dir) {
if (is_dir($dir)) {
$objects = scandir($dir);
foreach ($objects as $object) {
if ($object != "." && $object != "..") {
if (filetype($dir."/".$object) == "dir") rrmdir($dir."/".$object); else unlink($dir."/".$object);
}
}
#include <stdio.h>
#include <stdlib.h>
#define ALLOC ((unsigned char*)malloc(56))
#define A(x) (x & 0x4)
#define M(x) (x & 0x2)
#define P(x) (x & 0x1)
#define PTR(x) ((void*)x)
#define CHUNK_PTR(x) ((allocated_chunk*)(x - 8))
#define FREE_CHUNK(x) ((freed_chunk*)(x))
@0x00000FF
0x00000FF / region_list.php
Last active September 26, 2023 03:09
옛날에 만들어 둔 지역 선택 API (PHP)
<?php
/*
* A simple PHP file for Region Select API
* By P.Knowledge (0x00000FF)
*
* Data source from Namuwiki, 2020/11/04
*/
header("content-type: application/json");
@0x00000FF
0x00000FF / browser-copy-block.html
Created September 14, 2020 18:00
Prevents printing, context menu, and copy and developer console
<style>
@media print { * { display: none } }
</style>
<script>
document.addEventListener("contextmenu", function (e) {
e.preventDefault();
});
document.addEventListener("mousedown", function (e) {
// CoreLoad.cs Ln 412から
private bool AreTheseClose(int cmp1, int cmp2)
{
return Math.Abs(cmp1 - cmp2) < 25;
}
// タイトルバーのドラッグ終了
private void TitleBar_MouseUp(object sender, MouseEventArgs e)
{
@0x00000FF
0x00000FF / Cleaner.cs
Last active May 23, 2019 06:05
Everytime Article Fetch/Delete Class
/*
* Article/Comment Deletion Agent for Everytime service
* Available for .NET Framework/Core
*
* Newtonsoft.Json Required for Json Deserialization
* Json Types for Deserialization is under the Cleaner class
*/
using System.Collections.Generic;
using System.Text;