Skip to content

Instantly share code, notes, and snippets.

@khoazero123
khoazero123 / php-docker-ext
Created December 7, 2022 09:41 — forked from hoandang/php-docker-ext
Complete list of php docker ext
RUN apt update
RUN apt upgrade -y
RUN apt install -y apt-utils
RUN a2enmod rewrite
RUN apt install -y libmcrypt-dev
RUN docker-php-ext-install mcrypt
RUN apt install -y libicu-dev
RUN docker-php-ext-install -j$(nproc) intl
RUN apt-get install -y libfreetype6-dev libjpeg62-turbo-dev libpng12-dev
RUN docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/
@khoazero123
khoazero123 / guide.md
Created November 10, 2022 16:43 — forked from risan/guide.md
Windows 10, Laragon, PHP 5.6, SQL Server

Install SQL Server Express

  1. Download SQL Server Express 2019: https://www.microsoft.com/en-us/sql-server/sql-server-downloads
  2. Choose CUSTOM install
  3. Choose media download target location, leave it default.
  4. On SQL Server Installation Center choose "New SQL Server stand-alone installation..." menu.
  5. On Feature Selection at least select the main "Database Engine Services" option (SQL Server Replication, Machine Learning stuff, Full-Text search are optional). Also make sure all "Client Tools..." options and "SQL Client Connectivity SDK" are selected.
  6. On Instance Configuration we set the SQL Server instance name, we can leave all options default (SQLEXPRESS).
  7. On Server Configuration, we can set the "Startup Type" for "SQL Server Database Engine" to manual. So in order to use the SQL Server, we have to start it manualy through the Sql Server Configuration Manager application.
  8. On Database Engine Configuration set the "Authentication Mode" to Mixed Mode.
@khoazero123
khoazero123 / iterm2-solarized.md
Created October 16, 2020 02:25 — forked from kevin-smets/iterm2-solarized.md
iTerm2 + Oh My Zsh + Solarized color scheme + Source Code Pro Powerline + Font Awesome + [Powerlevel10k] - (macOS)

Default

Default

Powerlevel10k

Powerlevel10k

@khoazero123
khoazero123 / read_arguments.js
Created April 24, 2020 03:27 — forked from ishu3101/read_arguments.js
Accept input via stdin and arguments in a command line application in node.js
#!/usr/bin/env node
var args = process.argv.slice(2);
var input = args[0];
var isTTY = process.stdin.isTTY;
var stdin = process.stdin;
var stdout = process.stdout;
// If no STDIN and no arguments, display usage message
@khoazero123
khoazero123 / encryption.js
Created April 21, 2020 04:37 — forked from vlucas/encryption.ts
Stronger Encryption and Decryption in Node.js
'use strict';
const crypto = require('crypto');
const ENCRYPTION_KEY = process.env.ENCRYPTION_KEY; // Must be 256 bits (32 characters)
const IV_LENGTH = 16; // For AES, this is always 16
function encrypt(text) {
let iv = crypto.randomBytes(IV_LENGTH);
let cipher = crypto.createCipheriv('aes-256-cbc', Buffer.from(ENCRYPTION_KEY), iv);
@khoazero123
khoazero123 / setup_mailcatcher.sh
Created January 16, 2020 06:10 — forked from shark0der/setup_mailcatcher.sh
Mailcatcher installation script for Ubuntu 16.04 (14.04 commands commented out)
#!/bin/bash
# Install dependencies
# older ubuntus
#apt-get install build-essential libsqlite3-dev ruby1.9.1-dev
# xenial
apt install build-essential libsqlite3-dev ruby-dev
# Install the gem
gem install mailcatcher --no-ri --no-rdoc
@khoazero123
khoazero123 / Bookmarklet.txt
Created January 9, 2020 05:13 — forked from J2TEAM/Bookmarklet.txt
Bookmarklet to create links for your post on Facebook group. Create a new bookmark and paste this code.
data:text/html,<p style="text-align:center"><a href="https://www.junookyo.com" contenteditable>EDIT_ME</a></p>
@khoazero123
khoazero123 / gist:7f00f8cc6ae7cfe9c801170833457461
Created January 7, 2020 02:26
Visual Studio 2019 Product Key
Visual Studio 2019 Enterprise
BF8Y8-GN2QH-T84XB-QVY3B-RC4DF
Visual Studio 2019 Professional
NYWVH-HT4XC-R2WYW-9Y3CM-X4V3Y
@khoazero123
khoazero123 / submit.md
Created December 26, 2019 03:12 — forked from tanaikech/submit.md
File Transfer for Google Drive Without Authorization

File Transfer for Google Drive Without Authorization

Overview

In this article, I would like to introduce how to transfer files for Google Drive under no authorization.

This has also been published here. https://github.com/tanaikech/FileTransfer

Description

When we download and upload files for Google Drive, it usually has to use Drive API. In order to use Drive API, access token is required. If you want to make your friends download and upload files for your Google Drive, the authorization process is to take time. So I proposal this.

@khoazero123
khoazero123 / submit.md
Created December 26, 2019 02:55 — forked from tanaikech/submit.md
Downloading Shared Files on Google Drive Using Curl

Downloading Shared Files on Google Drive Using Curl

When the shared files on Google Drive is downloaded, it is necessary to change the download method by the file size. The boundary of file size when the method is changed is about 40MB.

File size < 40MB

CURL

filename="### filename ###"
fileid="### file ID ###"
curl -L -o ${filename} "https://drive.google.com/uc?export=download&amp;id=${fileid}"