Skip to content

Instantly share code, notes, and snippets.

View firejune's full-sized avatar
🔥
Working from home

Joon Kyoung firejune

🔥
Working from home
View GitHub Profile
@firejune
firejune / free_ports.sh
Created October 31, 2021 12:18 — forked from Stenudd/free_ports.sh
Free ports 80 and 443 on Synology NAS
#! /bin/bash
# Save this script in one of your shares and schedule it to run as root at boot
# through Control Panel -> Task Scheduler
# DSM upgrades will reset these changes, which is why we schedule them to happen automatically
# Set the variables below if you want to customise the ports which DSM will listen on instead
# NOTE: These ports are used for some services, e.g. Photo Station
HTTP_PORT=81
HTTPS_PORT=444
@firejune
firejune / gist:6f8a19d3370b2f1877aed58231cf9989
Created January 16, 2021 07:08 — forked from digitaljhelms/gist:4287848
Git/GitHub branching standards & conventions

Branching

Quick Legend

Description, Instructions, Notes
Instance Branch
@firejune
firejune / is_utf8.php
Created July 4, 2016 08:21 — forked from GeHou/is_utf8.php
php:is_utf8
<?php
function is_utf8($str) {
$temp_str = @iconv('utf-8', 'utf-8', $str);
if ($str === $temp_str) {
return 'utf8';
} else {
return 'gbk';
}
@firejune
firejune / ampify.php
Last active June 21, 2016 12:01 — forked from adactio/ampify.php
Make a chunk of markup AMP-ready(Fix self close img tag)
<?php
# Licensed under a CC0 1.0 Universal (CC0 1.0) Public Domain Dedication
# http://creativecommons.org/publicdomain/zero/1.0/
function ampify($html='') {
# Replace img, audio, and video elements with amp custom elements
$html = str_ireplace(
['<img','<video','/video>','<audio','/audio>'],
@firejune
firejune / fixcloudflare.php
Created June 21, 2016 07:01 — forked from kijin/fixcloudflare.php
CloudFlare 사용시 실제 방문자 IP 및 SSL 사용 여부 파악
<?php
/**
* CloudFlare 사용시 실제 방문자 IP 및 SSL 사용 여부를
* 정확하게 파악하지 못하는 문제를 해결하는 클래스
* 웹서버에 mod_cloudflare를 설치하기 곤란한 경우 사용한다
*
* Written by 기진곰 <kijin@kijinsung.com>
* License: Public Domain
*
@firejune
firejune / static_server.js
Last active March 25, 2016 07:33 — forked from ryanflorence/static_server.js
Node.JS static file web server. Put it in your path to fire up servers in any directory, takes an optional port argument.
'use strict';
const http = require('http');
const url = require('url');
const path = require('path');
const fs = require('fs');
const port = process.argv[2] || 8888;
http.createServer((req, res) => {
const uri = url.parse(req.url).pathname;
@firejune
firejune / README
Created September 5, 2011 08:40 — forked from mashihua/README
Cloud9 IED http_digest_auth Patch
Add http_digest_auth for Cloud9 IED.
Step:
1.git clone https://github.com/ajaxorg/cloud9.git
2.git submodule update --init --recursive
3.git apply cloud9.patch
4.bin/cloud9.sh -c config.js
5.open the url http://127.0.0.1:3000/
6.when prompt the authorization,username is admin and password is admin.