Skip to content

Instantly share code, notes, and snippets.

View dangnhdev's full-sized avatar

Nguyễn Hải Đăng dangnhdev

  • Hanoi, Vietnam
View GitHub Profile
@stevebauman
stevebauman / RouteServiceProvider.php
Last active May 14, 2024 02:19
Throw exception on Eloquent model binding name mismatch
<?php
namespaced App\Providers;
use RuntimeException;
use Illuminate\Support\Facades\Route;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Routing\ImplicitRouteBinding;
class RouteServiceProvider extends ServiceProvider

Setting up Localhost Nginx Reverse Proxy to react app

This helps you develop react apps through a sub domain secured by ssl through nginx without much hassle. Current config from Laragon on Windows

server {
    listen 80;
    listen 443 ssl;
@ivanskodje
ivanskodje / youtube-dl-download-pluralsight-videos.md
Last active August 10, 2024 20:08
youtube-dl for downloading pluralsight videos

Downloading Videos from Pluralsight

Disclaimer

Pluralsight do not permit users to download their videos.
If you are an user of pluralsight you have agreed with their ToS,
and are thusly refrained from doing so.
Use this knowledge at your own risk.

youtube-dl for Windows

@abhijeetchopra
abhijeetchopra / 0-README.md
Last active September 2, 2024 05:37
Creating automatic scheduled backup copies of your Google Sheets using Google Apps Script

How to "Schedule Automatic Backups" of your Google Sheets

This tutorial demonstrates how to use Google Apps Script to:

  • Create copies of the Google Sheet in the desired destination folder automatically at set intervals.

  • Append the time stamp with each backup file's name.

  • Adjust time trigger for backing up every day/hour/minute.

@josefeg
josefeg / CreditCardNumberGenerator.java
Last active February 27, 2024 17:04
Credit card number generator in Java
import java.util.Random;
/**
* A credit card number generator.
*
* @author Josef Galea
*/
public class CreditCardNumberGenerator {
private Random random = new Random(System.currentTimeMillis());