Skip to content

Instantly share code, notes, and snippets.

View tr4nk's full-sized avatar

Khai Tran tr4nk

  • Ho Chi Minh City, Vietnam
View GitHub Profile
@tr4nk
tr4nk / Activate_Windows_8_8.1_10_and_11_Pro_for_Free.md
Created February 10, 2025 04:33
Activate Windows 8, 8.1, 10 and 11 Pro for Free

Activate Windows 8, 8.1, 10 and 11 Pro for Free

A guide how to get and activate Windows 8, 8.1, 10 and 11 Pro for free!

WATCH OUT FOR SUSPICIOUS LINKS IN THE COMMENTS BELOW!

I noticed that people or bots are trying to place suspicious links below that link to some sketchy source for what they say is a 'crack' or nothing at all. I'd recommend you to NOT click on any of those links! The scripts in this guide are open source and can be viewed as desired. I'm fine with posting coupons here! Do note that if you do so, please prove it! Link a review site along with the site and the coupon. Thanks, Minionguyjpro.

NOTE

If you see the Windows keyboard button in this guide; and you can't find it on your keyboard, you likely have/had Windows 10 which has the button . If you can't find that one, you likely have a PC that

Set folder permissions for website

Prerequisites

  • Dir: /var/www/my-website.com/
  • User: john
  • Web server group: www-data

TL;DR

Set folder permissions for laravel project:

@tr4nk
tr4nk / Cake2_AppModel.php
Created February 25, 2020 02:52
Cake2 AppModel
<?php
App::uses('Model', 'Model');
class AppModel extends Model
{
/**
* Connects to specified database
*
* @param String name of different database to connect with.
* @param String name of existing datasource
@tr4nk
tr4nk / multiple_ssh_setting.md
Last active October 3, 2019 15:30 — forked from jexchan/multiple_ssh_setting.md
Multiple SSH keys for different github accounts

Multiple SSH Keys settings for different github account

create different public key

create different ssh key:

$ ssh-keygen -t rsa -C "[email protected]"
@tr4nk
tr4nk / copy_file_list.sh
Created June 7, 2019 04:21
Copy file list from dir A to dir B/subdir
#!/bin/bash
# declare the following variables: SRC, DEST, LIST_FILE
# cmd: copy_file_list.sh "subdir"
SRC=/d/path/to/A
DEST=/d/path/to/B
# (subdir)
DEST_PARENT=$1
@tr4nk
tr4nk / .0-sample php-apache docker-compose file.md
Last active January 21, 2018 03:14
sample php-apache docker-compose file

Sample php-apache docker-compose file

Project directory structure

project

  • .docker
    • docker-compose.yml
    • vhost.conf

Notes

Set your database config host and port the same as environment variables DB_HOST and DB_PORT (defined in docker-compose.yml).

@tr4nk
tr4nk / curl-with-sftp-https.md
Created January 6, 2018 05:58
Install curl with sftp and https support on Ubuntu
  • Download latest curl
  • Manual install curl:
sudo apt install libssh2-1-dev libssl-dev
cd curl/
./configure --with-ssl --with-libssh2
make
sudo make install
  • Test installation: