Skip to content

Instantly share code, notes, and snippets.

View kenjiroe's full-sized avatar

Kenjiro Sarjonator kenjiroe

View GitHub Profile
@kenjiroe
kenjiroe / th-address.json
Created November 20, 2023 17:35 — forked from mennwebs/th-address.json
Thai Address from Postal Code - JSON
This file has been truncated, but you can view the full file.
[
{
"zipCode": "10100",
"subDistrictList": [
{
"subDistrictId": "100801",
"districtId": "1008",
"provinceId": "10",
"subDistrictName": "ป้อมปราบ"
stream {
server {
listen 4343 ssl;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_ciphers AES128-SHA:AES256-SHA:RC4-SHA:DES-CBC3-SHA:RC4-MD5;
ssl_certificate /path/to/cert.pem;
ssl_certificate_key /path/to/cert.key;
ssl_session_cache shared:SSL:10m;
ssl_session_timeout 10m;
@kenjiroe
kenjiroe / hashtag.php
Last active October 26, 2016 10:18
Hashtag
<?php
function convertHashtags($str){
$regex = "/#+([a-zA-Z0-9_]+)/";
$str = preg_replace($regex, '<a href="hashtag.php?tag=$1">$0</a>', $str);
return($str);
}
$string = "I am #UberSilly and #MegaPlayful online";
$string = convertHashtags($string);
echo $string;
version: '2'
services:
zabbix-db:
image: zabbix/zabbix-db-mariadb
volumes:
- zabbix-db-storage:/var/lib/mysql
- backups:/backups
- /etc/localtime:/etc/localtime:ro
environment:
- MARIADB_USER=zabbix
<?php
/**
* Description of ArraytoCSV
*
* @author Haroon Abbasi
*/
class ArraytoCSV {