This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<style> | |
body { | |
background-color: black; | |
font-family: "Fira Code"; | |
color: white; | |
} | |
#counter { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class FormOption | |
{ | |
public | |
$style, | |
$suggested_value, | |
$placeholder, | |
$autofocus; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<style> | |
body { | |
margin: 0; | |
padding: 0; | |
background-color: black; | |
color: white; | |
font-family: "Fira Code"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* 전화번호에 하이픈을 붙입니다. | |
* 02-000-0000, 02-0000-0000, 000-000-0000, 000-0000-0000, | |
* 010-000-0000, 010-0000-0000, 1000-0000 | |
* 의 형태로 전화번호를 가공하고, 숫자가 더 남았을 경우 뒤에 이어붙여 표시합니다. | |
* | |
* @param {string} number 전화번호를 담은 문자열 | |
* @returns {string} | |
*/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$type = array_merge( | |
array_fill_keys([ | |
'css', | |
'css2' | |
], 'css'), | |
array_fill_keys([ | |
'prejs', | |
'prejs2', | |
'js', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
text = text.replace(/(={65})\s*([^=\n]*)\s*(={65})/g, '# $2'); | |
text = text.replace(/(-{65})\s*([^\n]*)\s*(-{65})/g, '## $2'); | |
text = text.replace(/ ([^\n]*)\s*\n-+\n/g, '### $1\n\n'); | |
text = text.replace(/ ([^\s]+) +(.+)/, 'ftyuftyu'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class db_handler extends PDO | |
{ | |
private function emitError($message) | |
{ | |
return $message; | |
} | |
public function immigrateData( | |
$table_from, $columns_from, $table_to, $mapping, $start_at = 0, $limit = null |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// temporary explanation: | |
// $menu_href is a multi-dimensional array with depth levels for each item as values | |
// $menu_name is a multi-dimensional array with names for each item as values | |
// Yes these are not so effective ways to contain list datas. Terrible, actually. | |
// @@ gets the link, ## gets the content, $$ gets the contents under it (if there is) | |
$sub_menu_format = array( | |
array( | |
'', | |
"<li class='sub'>\n"."$$\n"."</li>\n", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var randomNumber = function(length, isLengthRandom = false) { | |
var number = 0; | |
actualLength = isLengthRandom? | |
parseInt(Math.random()*length)+1: | |
length; | |
number = parseInt(Math.random()*Math.pow(10, actualLength)); | |
return number; | |
} | |
var formatEachLetter = function(str, format, indicator) { | |
var formatted = ""; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* It let you do what you can do with `preg_replace` with `mb_ereg_replace`. | |
* | |
* replacing multiple strings at once. | |
* | |
* @param array $pattern | |
* @param array $replacement | |
* @param $string | |
* |