Skip to content

Instantly share code, notes, and snippets.

View savepong's full-sized avatar
:octocat:
savepong

Pongsiri Pisutakarathada savepong

:octocat:
savepong
View GitHub Profile
@savepong
savepong / drum-machine.markdown
Created February 18, 2021 17:38
Drum Machine
@savepong
savepong / index.html
Created February 15, 2021 15:23
Simple React Markdown Previewer
<script src="https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js"></script>
<div id="app"></div>
@savepong
savepong / index.pug
Created February 3, 2021 16:23
Pure CSS iOS Icons
//pure css google analytics icon
h1 Pure CSS iOS Icons
.main-container
.container
.icon-container
.bar.bar-left
.bar.bar-middle
.bar.bar-right
h2 Analytics
.container
@savepong
savepong / freecodecamp-personal-portfolio.markdown
Created February 3, 2021 15:08
freeCodeCamp: Personal Portfolio
@savepong
savepong / index.html
Created December 14, 2020 09:29
Sample Multi Drag Code
<div id="app">
<v-app id="inspire">
<v-card
class="mx-auto"
tile
>
<draggable v-for="(item, index) in images"
v-model="images[index]"
group="image"
@savepong
savepong / index.html#myModal
Created May 27, 2019 15:13
เปิด Modal จากลิงค์ # ด้วย javascript
<script>
$(document).ready(function() {
if(window.location.href.indexOf('#myModal') != -1) {
$('#myModal').modal('show');
}
});
</script>
@savepong
savepong / checknumber.php
Created May 17, 2019 04:19
เช็คว่ามีเป็นตัวเลขใน string หรือไม่? และมีกี่ตัว?
$str = '183293819203';
preg_match_all('!\d!', $str, $numbers);
dd( count($numbers[0])==13 );
@savepong
savepong / foo.php
Created March 1, 2019 03:57
Content-Type is not allowed by Access-Control-Allow-Headers
header('Access-Control-Allow-Origin: *');
header('Access-Control-Allow-Methods: POST,GET,OPTIONS');
header('Access-Control-Allow-Headers: Origin, X-Requested-With, Content-Type, Accept');
@savepong
savepong / foo.php
Created February 27, 2019 12:37
PHP Fatal Error: Allowed Memory Size Exhausted
<?php
ini_set('memory_limit', '1024M'); // or you could use 1G
<?php
/**
* @package Tags in Category
*/
/*
Plugin Name: Tags in Category
Plugin URI: https://github.com/savepong/tags-in-category
Description: Show categories child of parent category
Version: 1.0
Author: Pongsiri Chuaychoonoo