Skip to content

Instantly share code, notes, and snippets.

View tranchausky's full-sized avatar
🏹
done

tranchausky

🏹
done
View GitHub Profile
@tranchausky
tranchausky / php-get-calendar-public.php
Created March 21, 2024 09:03
get 8 day data from google calader (Use this URL to access this calendar from a web browser.)
<?php
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);
$input = 'https://calendar.google.com/calendar/embed?src=a56ac6da1d0184b389b3f590ba25b686b1bc6580f5666b0c6ae63259b31cbb1b%40group.calendar.google.com&ctz=Asia%2FHo_Chi_Minh';
$resl = builLink($input);
@tranchausky
tranchausky / php-resizemage.php
Last active February 21, 2024 03:54
php resize image (laravel -plupload)
<?php
namespace App\Services;
use Illuminate\Filesystem\Filesystem;
class FileUploadChurkService extends BaseService
{
public function __construct()
{
@tranchausky
tranchausky / bt201-web.ino
Last active January 28, 2024 11:12
bt201 + nanoMcu + website
#include <SPI.h>
#include <Wire.h>
#include <SoftwareSerial.h>
#include <ESP8266WebServer.h>
#include <ESP8266WiFiMulti.h>
#include <ESP8266WiFi.h>
#include <ESP8266HTTPClient.h>
@tranchausky
tranchausky / XAMPP-multi-php.txt
Last active January 1, 2024 13:12
Running multiple PHP versions on XAMPP - Chạy nhiều phiên bản php trong XAMPP (Mặc đinh OS win)
Các bước để chạy XAMPP nhiều phiên bản
ví dụ
localhost:80 php 8
localhost.com8 php 8
localhost.com7 php 7
localhost.com5 php 5
-step 0----------------------
đã cài xampp trước nha
<ul id="example-element" class="transition-all unhighlighted" style="list-style-type: space-counter;">
<li>Apollo</li>
<li>Hubble</li>
<li>Chandra</li>
<li>Cassini-Huygens</li>
</ul>
<ul id="example-element" class="transition-all unhighlighted" style="list-style-type: space-counter-view;">
<li>Chandra1</li>
@tranchausky
tranchausky / .htaccess
Created December 30, 2023 11:46
Use a subdirectory as root with htaccess
RewriteEngine on
RewriteCond %{HTTP_HOST} ^domain-name.com$ [NC,OR]
RewriteCond %{HTTP_HOST} ^www.domain-name.com$
RewriteCond %{REQUEST_URI} !folder/
RewriteRule (.*) /folder/$1 [L]
@tranchausky
tranchausky / .htaccess
Last active December 22, 2023 03:27
php return image from link if not have in server (help download image from server to dev environment)
RewriteEngine On
ErrorDocument 404 /public/404.php
@tranchausky
tranchausky / IndexedDB101.js
Created October 26, 2023 09:45 — forked from JamesMessinger/IndexedDB101.js
Very Simple IndexedDB Example
// This works on all devices/browsers, and uses IndexedDBShim as a final fallback
var indexedDB = window.indexedDB || window.mozIndexedDB || window.webkitIndexedDB || window.msIndexedDB || window.shimIndexedDB;
// Open (or create) the database
var open = indexedDB.open("MyDatabase", 1);
// Create the schema
open.onupgradeneeded = function() {
var db = open.result;
var store = db.createObjectStore("MyObjectStore", {keyPath: "id"});
@tranchausky
tranchausky / eng-distionary.sql
Created October 24, 2023 18:05
database structure basic
-- Adminer 4.8.1 MySQL 10.4.27-MariaDB dump
SET NAMES utf8;
SET time_zone = '+00:00';
SET foreign_key_checks = 0;
SET sql_mode = 'NO_AUTO_VALUE_ON_ZERO';
SET NAMES utf8mb4;
DROP TABLE IF EXISTS `eng`;
[
{
"slug":"msft",
"project":"Microsoft Ads",
"client":"Craft",
"cat":"1",
"deliverables":"Standard and rich media HTML5 ads.",
"notes":"Microsoft has so many well-known products. I've had the privilege of working on quite a few of their digital ad campaigns. Below are some of my favorites...",