Skip to content

Instantly share code, notes, and snippets.

View hakasenyang's full-sized avatar
I may be slow to respond.

Hakase hakasenyang

I may be slow to respond.
View GitHub Profile
@hakasenyang
hakasenyang / keybase.md
Last active October 3, 2016 01:10
keybase

Keybase proof

I hereby claim:

  • I am hakasenyang on github.
  • I am hakasekr (https://keybase.io/hakasekr) on keybase.
  • I have a public key ASBcKdb7OdOaUEBe0qTfqMAOSjXZ6E0ifaaXInLSJ28xtgo

To claim this, I am signing this object:

@hakasenyang
hakasenyang / kakao_openchat.php
Last active June 28, 2017 04:17
카카오톡 오픈채팅 유저 대화내용으로 얼마나 대화했는지 확인할 수 있습니다. (PC버전에서 텍스트 파일로 내보내기 기능을 이용하세요.)
<?php
define('MAX_LEN', (1024*1024*5.5));
function rank( $array ) {
// https://stackoverflow.com/questions/21521986/how-do-i-rank-array-values-with-duplicate-values-without-skipping-any-rank
// initialize variables
$position_array = array();
$copy_array = array();
$final_array = array();
$pos = 1;
#!/bin/sh
gets() {
echo QUIT | openssl s_client -connect 127.0.0.1:443 -servername "${1}" -tls1_2 -cipher ECDH -status > /dev/null 2>&1
echo QUIT | openssl s_client -connect 127.0.0.1:443 -servername "${1}" -tls1_2 -cipher aRSA:RSA -status > /dev/null 2>&1
}
ABCD=`find /etc/nginx -name "*.conf" | xargs grep --no-filename -Poe 'server_name \K[^; ]+' | sed -e "s/^*//g" | sed -e "s/*/wildcards/g" | sort -u`
for i in $ABCD
@hakasenyang
hakasenyang / graphicEQUrl.js
Created April 19, 2019 03:50 — forked from paceaux/graphicEQUrl.js
Graphic EQ in a url
/* Courtesy of Jake Albaugh: https://twitter.com/jake_albaugh/status/1118611365508337665 */
const bars = ["▁", "▂", "▃", "▄", "▅", "▆", "▇", "█"];
const ctx = new AudioContext();
const analyser = ctx.createAnalyser();
analyser.fftSize = 32;
const uIntArray = new Uint8Array(16);
navigator.mediaDevices.getUserMedia({ audio: true }).then(stream => {
ctx.createMediaStreamSource(stream).connect(analyser);
updateUrl();
@hakasenyang
hakasenyang / SSLTLS.md
Last active May 26, 2019 07:48
안전한 SSL/TLS 를 설정하는 방법

안전한 SSL/TLS 를 설정하는 방법

SSL/TLS 인증서 크기

현재 SSL 크기 중에 안전하면서도 가벼운 (속도 빠른) 크기는 다음과 같다.

  • ECC : 256 bit
  • RSA : 2048 bit

이 크기보다 더 큰 경우에는 속도가 느리다는 단점이 있다. 물론 PC에서는 체감하기 힘들겠지만, 서버에도 부담 될 뿐더러 모바일 사용자에게는 좋은 경험이 되지 못 한다.

@hakasenyang
hakasenyang / gamemode.php
Last active July 22, 2019 13:46
PHP - osu! Gamemode Converter
<?php
/**
* 게임모드 변환 함수
* 레퍼런스 참조는 아래 주석.
* https://github.com/ppy/osu-api/wiki
* enum Mods
* {
* None = 0,
* NoFail = 1,
* Easy = 2,
@hakasenyang
hakasenyang / kt_reset.php
Created April 19, 2021 16:49
KT carrier reset (PHP)
<?php
class WEBParser
{
private $httph = 'Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/53.0.2785.116 Safari/537.36';
public function splits($data, $first, $end, $num = 1)
{
$temp = @explode($first, $data);
$temp = @explode($end, $temp[$num]);
$temp = $temp[0];
return $temp;
@hakasenyang
hakasenyang / index.php
Last active July 22, 2021 09:45
ssl.hakase.io source
<?php
// Tor Check : https://gist.github.com/TheRealBastiaan/889b4ec5fafd928e0de2
function IsTorExitPoint($ip=null){
$ip = ($ip) ? $ip : $_SERVER['REMOTE_ADDR'];
if (gethostbyname(ReverseIPOctets($ip).".".$_SERVER['SERVER_PORT'].".".ReverseIPOctets($_SERVER['SERVER_ADDR']).".ip-port.exitlist.torproject.org")=="127.0.0.2") {
return true;
} else {
return false;
}
}