Skip to content

Instantly share code, notes, and snippets.

View aliharis's full-sized avatar
💀

haris aliharis

💀
View GitHub Profile
@aliharis
aliharis / MPG.php
Last active April 2, 2020 09:59
MPG.php
<?php
/**
* Maldives Payment Gateway Integration
* @author haris
*/
class MPG
{
private $version;
@aliharis
aliharis / README.md
Created July 27, 2020 21:04 — forked from arikfr/README.md
Setting up HTTPS with LetsEncrypt for Redash Docker Deployment
  1. Make sure the domain you picked points at the IP of your Redash server.
  2. Switch to the root user (sudo su).
  3. Create a folder named nginx in /opt/redash.
  4. Create in the nginx folder two additional folders: certs and certs-data.
  5. Create the file /opt/redash/nginx/nginx.conf and place the following in it: (replace example.redashapp.com with your domain name)
    upstream redash {
        server redash:5000;
    }
    
@aliharis
aliharis / delete_stale_branches.sh
Created January 21, 2024 09:10
Delete stale branches on your machine
#!/bin/bash
# Update the local repository and prune remote-tracking branches
git fetch --prune
# Loop over each local branch and check if it has a remote tracking branch
for branch in $(git branch -vv | grep ': gone]' | awk '{print $1}'); do
echo "Deleting local branch: $branch"
git branch -d "$branch"
done
@aliharis
aliharis / main.go
Created January 25, 2024 19:59
Reverse proxy in Go
package main
import (
"net/http"
"net/http/httputil"
"net/url"
)
func main() {
// Parse the target URL