Skip to content

Instantly share code, notes, and snippets.

@Tommy0412
Tommy0412 / recursive_extract_zip_node.js
Created May 29, 2024 15:39 — forked from dev-drprasad/recursive_extract_zip_node.js
Extract uploaded zip files using express.js and nodejs with recursive extraction
const express = require('express');
const fs = require('fs');
const extract = require('extract-zip')
const formidable = require('formidable');
const path = require('path');
const uploadDir = path.join(__dirname, '/uploads/');
const extractDir = path.join(__dirname, '/app/');
if (!fs.existsSync(uploadDir)) {
fs.mkdirSync(uploadDir);
}
@Tommy0412
Tommy0412 / cors.php
Created May 29, 2024 12:52 — forked from avtaniket/cors.php
Handle CORS in PHP
<?php
/* Handle CORS */
// Specify domains from which requests are allowed
header('Access-Control-Allow-Origin: *');
// Specify which request methods are allowed
header('Access-Control-Allow-Methods: PUT, GET, POST, DELETE, OPTIONS');
@Tommy0412
Tommy0412 / example.srt
Last active May 21, 2024 16:06 — forked from matibzurovski/example.srt
Example srt file
1
00:00:00,000 --> 00:00:00,000
-