Skip to content

Instantly share code, notes, and snippets.

View html-list-expand-collapsible.html
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<link rel="stylesheet" href="style.css">
</head>
<body>
<div class="rundiz-expandcollapse-list">
<ul>
<li>
@ve3
ve3 / 01-form-single.html
Last active Jun 19, 2021
Slice large file into chunks and upload using JavaScript.
View 01-form-single.html
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>XHR upload large file with slice</title>
<style>
#debug {
border: 3px dashed #ccc;
margin: 10px 0;
padding: 10px;
@ve3
ve3 / demo1-max-concurrent-wait-all.html
Last active Jun 17, 2021
Ajax (XHR) with max concurrent connection.
View demo1-max-concurrent-wait-all.html
<!--demo1-max-concurrent-wait-all.html-->
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>XHR multi concurrent connection</title>
<style>
#debug {
border: 3px dashed #ccc;
margin: 10px 0;
@ve3
ve3 / thai-characters.php
Last active Aug 13, 2020
PHP: list Thai characters in array. แสดงอักขระภาษาไทยเป็น array.
View thai-characters.php
<?php
echo '<meta charset="utf-8">' . PHP_EOL;
/*for ($i = 0; $i <= 255; $i++) {
$string = chr($i);
echo $i . ' =&gt; ';
echo iconv('tis-620', 'utf-8//IGNORE', $string);
@ve3
ve3 / timezone-selectbox.php
Last active Nov 17, 2019
Generate timezones list array
View timezone-selectbox.php
<?php
function getTimezones(): array
{
$timezones = \DateTimeZone::listIdentifiers();
$options = [];
$lastRegion = '';
if (is_array($timezones)) {
foreach ($timezones as $key => $timezone) {
$DateTimeZone = new \DateTimeZone($timezone);
@ve3
ve3 / functions.php
Last active Jul 14, 2019
Check password hash length for each algo.
View functions.php
<?php
function printDebug($var)
{
echo '<pre>' . print_r($var, true) . '</pre>' . PHP_EOL;
}
/**
@ve3
ve3 / data-from-versioncontrol-steamdb.php
Last active Apr 26, 2019
Kingdom Rush Origins format save data to readable achievements.
View data-from-versioncontrol-steamdb.php
<?php
if (!is_file('filtered-savefile.php')) {
die('Unable to get filtered data, please run save-file.php first.');
}
require 'filtered-savefile.php';
// https://steamdb.info/app/816340/history/
@ve3
ve3 / Encryption.js
Last active Sep 1, 2021
Encrypt and decrypt between programming languages (PHP & JavaScript).
View Encryption.js
/**
* Encryption class for encrypt/decrypt that works between programming languages.
*
* @author Vee Winch.
* @link https://stackoverflow.com/questions/41222162/encrypt-in-php-openssl-and-decrypt-in-javascript-cryptojs Reference.
* @link https://github.com/brix/crypto-js/releases crypto-js.js can be download from here.
*/
class Encryption {
@ve3
ve3 / typography-and-form.html
Last active Jul 30, 2019
Most of HTML elements for styling with your CSS.
View typography-and-form.html
<!--You can use for any purpose, think it is MIT license or no license-->
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>HTML for styling</title>
<!--add your css here-->
</head>
<body>