Skip to content

Instantly share code, notes, and snippets.

View HanbitGaram's full-sized avatar
✈️
デジタルノーマッド旅行中 (Digital Nomad Traveling)

HanbitGaram(ハンビッガラム) HanbitGaram

✈️
デジタルノーマッド旅行中 (Digital Nomad Traveling)
View GitHub Profile
@HanbitGaram
HanbitGaram / hanbitgaram.cache.extend.php
Created January 8, 2024 18:01
그누보드용 간이 캐싱 도구
<?php
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
function get_hanbit_cache(string $cacheName, int $cacheTime=5){
$cacheName = preg_replace("#[^a-zA-Z0-9\-\_]#", "", $cacheName);
$file = G5_PATH.'/data/cache/hanbit-cache-'.$cacheName.'-final.bin';
if(!is_file($file)) return false;
$currentTime = time();
@HanbitGaram
HanbitGaram / SimpleFile.php
Last active September 22, 2023 08:50
PHP 파일 저장 클래스
<?php
class SimpleFile{
protected ?string $saveFunctions = null;
protected ?string $loadFunctions = null;
public function __construct(){
/***
* file_***_contents 는 fopen을 랩핑한 것이지만,
* 서버에 따라서 보안상 실행을 차단하여 사용이 안되는 경우가 은근히 존재함.
* 설정을 따로 두는 이유는, 혹시 모를 get만 차단했다던가... 등의 사유
@HanbitGaram
HanbitGaram / justMysqli.php
Created September 21, 2023 02:46
MySQLi 자주 쓰는 함수 정리
<?php
/***
* MySQL 설정
*/
const MYSQL_HOST = 'localhost';
const MYSQL_ID = 'asdf';
const MYSQL_PASS = 'asdf';
const MYSQL_DB = 'asdf';
$_ENV['mLink'] = @mysqli_connect(MYSQL_HOST, MYSQL_ID, MYSQL_PASS, MYSQL_DB) or die(json_encode(['status'=>'false', 'reason'=>'DB Error!']));
@HanbitGaram
HanbitGaram / curl.php
Last active September 21, 2023 02:45
필요해서 만든 PHP 함수
<?php
function httpRequest($method='GET', $args=[]){
if(!isset($args['ua']))
$args['ua'] = "Mozilla/5.0 Application";
$method = strtoupper($method);
$args = [
'url'=>'',
'headers'=>[],
# Docker Update usage
- https://walialu.com/updating-mastodon-instance-docker-version
@HanbitGaram
HanbitGaram / rfc3161.txt
Created November 25, 2021 16:23 — forked from Manouchehri/rfc3161.txt
List of free rfc3161 servers.
http://timestamp.digicert.com
http://timestamp.globalsign.com/tsa/r6advanced1
http://rfc3161timestamp.globalsign.com/advanced
http://timestamp.sectigo.com
http://timestamp.apple.com/ts01
http://tsa.mesign.com
http://time.certum.pl
https://freetsa.org
http://timestamp.globalsign.com/scripts/timstamp.dll
http://timestamp.globalsign.com/?signature=sha2
@HanbitGaram
HanbitGaram / keybase.md
Created October 1, 2019 03:02
keybase.md

Keybase proof

I hereby claim:

  • I am HanbitGaram on github.
  • I am gwiyomisaranghae (https://keybase.io/gwiyomisaranghae) on keybase.
  • I have a public key whose fingerprint is E8FF DC1A 7944 F0B3 BA6C 5506 BB27 9326 5C30 5D9C

To claim this, I am signing this object: