Skip to content

Instantly share code, notes, and snippets.

View mendaparadarshit's full-sized avatar

Darshit Mendapara mendaparadarshit

View GitHub Profile
<?php
$array = array(
'21' => array(),
'24' => array(
'22' => array(),
'25' => array(
'26' => array()
)
)
);
@mendaparadarshit
mendaparadarshit / Install Composer using MAMP's PHP.md
Created August 29, 2019 04:17 — forked from irazasyed/Install Composer using MAMP's PHP.md
Instructions on how to change preinstalled Mac OS X PHP to MAMP's PHP Installation and then install Composer Package Management

Change default Mac OS X PHP to MAMP's PHP Installation and Install Composer Package Management


Instructions to Change PHP Installation


First, Lets find out what version of PHP we're running (To find out if it's the default version).

To do that, Within the terminal, Fire this command:

which php

MAMP PRO 4 Trial Reset

A simple script that resets latest MAMP PRO 4 trial validity, and keeps your data safe.

How to use

  • Copy the code into a file OR download the script and save it as reset_mamp4.sh
  • Open the Terminal app and write chmod +x then drag and drop the file on the Terminal. You should have something like chmod +x reset_mamp4.sh. Press Enter to run it.
  • Now, run the file itself by dragging and dropping it on the Terminal (something like reset_mamp4.sh) then pressing Enter.
  • Open MAMP PRO and check if you have 14 days left now.

Didn't work?

@mendaparadarshit
mendaparadarshit / Activate Office 2019 for macOS VoL.md
Created March 19, 2020 07:40 — forked from zthxxx/Activate Office 2019 for macOS VoL.md
crack activate office on mac with license file

Activate MS Office 2019/2016 for macOS - Microsoft_Office_2019_VL_Serializer

Office 2019 above

2019-06-03

Note that Office2019 DO NOT support activate via simple copy/paste plist license file which is the simplest way to activate Office 2016. Fortunately, you can also use the VL Serializer tool, just install Office 2019 and Serializer, then run Serializer to activate.

Ref

@mendaparadarshit
mendaparadarshit / install_lamp_ubuntu.sh
Created February 20, 2021 12:43 — forked from ankurk91/install_lamp_ubuntu.sh
Ubuntu 20 - PHP development (php 7.4, apache 2.4)
#!/bin/bash
set -euo pipefail
IFS=$'\n\t'
# Ubuntu 20.04 dev Server
# Run like - bash install_lamp.sh
# Script should auto terminate on errors
echo -e "\e[96m Adding PPA \e[39m"
sudo add-apt-repository -y ppa:ondrej/apache2
@mendaparadarshit
mendaparadarshit / client.cpp
Created October 12, 2019 09:16 — forked from SteveRuben/client.cpp
Multiple streaming in c++ using opencv; OpenCV video streaming over TCP/IP
/**
* OpenCV video streaming over TCP/IP
* Client: Receives video from server and display it
* by Steve Tuenkam
*/
#include "opencv2/opencv.hpp"
#include <sys/socket.h>
#include <arpa/inet.h>
#include <unistd.h>
import Foundation
import Photos
typealias AssetID = String
class ImageUtil {
static var defaultAlbumName = "App Name"
static var videosAlbumName = "App Name Videos"