Skip to content

Instantly share code, notes, and snippets.

View hataiit9x's full-sized avatar
🏠
Working from home

Tai Ha hataiit9x

🏠
Working from home
View GitHub Profile
@hataiit9x
hataiit9x / google-docs-copy.js
Created February 5, 2024 02:12 — forked from Snarp/google-docs-copy.js
Script to allow copying from a protected Google Doc
/*
<https://stackoverflow.com/questions/40296831/is-it-possible-to-force-a-copy-of-a-protected-google-doc>
NOTE - 2021-05-24
-----------------
The script below isn't the fastest way to copy-and-paste from a protected
Google Doc. Before trying it, I'd suggest following MikoFrosty's advice from
the comments:
@hataiit9x
hataiit9x / README.md
Created December 4, 2023 02:38 — forked from behitek/README.md
@hataiit9x
hataiit9x / wp-perf.md
Created November 7, 2023 03:19 — forked from Ruzgfpegk/wp-perf.md
WordPress Performance & Development tips

How to setup a practically free CDN using Backblaze B2 and Cloudflare

⚠️ Note 2023-01-21
Some things have changed since I originally wrote this in 2016. I have updated a few minor details, and the advice is still broadly the same, but there are some new Cloudflare features you can (and should) take advantage of. In particular, pay attention to Trevor Stevens' comment here from 22 January 2022, and Matt Stenson's useful caching advice. In addition, Backblaze, with whom Cloudflare are a Bandwidth Alliance partner, have published their own guide detailing how to use Cloudflare's Web Workers to cache content from B2 private buckets. That is worth reading,

@hataiit9x
hataiit9x / System Design.md
Created July 28, 2023 10:45 — forked from vasanthk/System Design.md
System Design Cheatsheet

System Design Cheatsheet

Picking the right architecture = Picking the right battles + Managing trade-offs

Basic Steps

  1. Clarify and agree on the scope of the system
  • User cases (description of sequences of events that, taken together, lead to a system doing something useful)
    • Who is going to use it?
    • How are they going to use it?
@hataiit9x
hataiit9x / Dockerfile
Created May 9, 2023 03:36 — forked from rajeshisnepali/Dockerfile
php7.3-alpine-composer (Dockerfile)
# Set master image
FROM php:7.3-fpm-alpine
MAINTAINER Rajesh Chaudhary <rajeshisnepali@gmail.com>
# Copy composer.lock and composer.json
#COPY composer.lock composer.json /var/www/
# Set working directory
WORKDIR /var/www
@hataiit9x
hataiit9x / mastodon-installer-for-CentOS7x-with-KUSANAGI-at-SakuraVPS.sh
Created March 6, 2023 05:27 — forked from KEINOS/mastodon-installer-for-CentOS7x-with-KUSANAGI-at-SakuraVPS.sh
さくらのVPS+KUSANAGI+CentOS7でMastodonをインストールするシェルスクリプト。One-liner Mastodon Instance installer for CentOS7.2 with KUSANAGI on SakuraVPS.
#!/bin/bash
echo
echo "-----------------------------"
echo " ╔╦╗╔═╗╔═╗╔╦╗╔═╗╔╦╗╔═╗╔╗╔"
echo " ║║║╠═╣╚═╗ ║ ║ ║ ║║║ ║║║║"
echo " ╩ ╩╩ ╩╚═╝ ╩ ╚═╝═╩╝╚═╝╝╚╝"
echo " Installer for Sakura VPS"
echo " (CentOS7x with KUSANAGI)"
echo "-----------------------------"
echo
@hataiit9x
hataiit9x / README.md
Created September 28, 2022 04:29 — forked from TheBinitGhimire/README.md
Getting an AWS Educate account with $100 worth of cloud credits!
@hataiit9x
hataiit9x / aws_ec2_start_stop.json
Created September 13, 2022 09:03 — forked from amitavroy/aws_ec2_start_stop.json
AWS EC2 Start Stop Lambda
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "VisualEditor0",
"Effect": "Allow",
"Action": [
"ec2:Start*",
"ec2:Stop*",
"ec2:DescribeInstanceStatus"
@hataiit9x
hataiit9x / test-memcached.php
Created March 14, 2022 08:01 — forked from maartendekeizer/test-memcached.php
Memcached test script
<?php
/**
* @license MIT License
* @copyright maartendekeizer
*/
$memcached = new Memcached();
$memcached->addServer('127.0.0.1', 11211);