This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM php:7.4-cli | |
# Update packages | |
RUN apt-get update | |
# Install PHP and composer dependencies | |
RUN apt-get install -qq git curl libmcrypt-dev libjpeg-dev libpng-dev libfreetype6-dev libbz2-dev libzip-dev | |
# Clear out the local repository of retrieved package files | |
RUN apt-get clean |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App/Controllers; | |
use App/models/CacheModel as Cache; | |
Class HomeController | |
{ | |
private $cache; | |
public function __construct() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App/Models; | |
class CacheModel | |
{ | |
private $instance = null; | |
public function __construct() | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
error_reporting(E_ALL & ~E_NOTICE); | |
$mc = new Memcached(); | |
$mc->addServer("localhost", 11211); | |
$mc->set("foo", "Hello!"); | |
$mc->set("bar", "Memcached..."); | |
$arr = array( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* @author Abhishek Jain | |
* @email [email protected] | |
* @create date 2019-07-02 12:08:44 | |
* @modify date 2019-07-02 12:08:44 | |
* @desc Helper to Implement Google Recaptcha V3 | |
* Update: | |
0. Pleace your Google-server-secret and google-client-key before proceeding | |
Create these keys at: https://www.google.com/u/1/recaptcha/admin/create |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#add these primary resources to include Facebook | |
<div id="fb-root"></div> | |
# button for facebook | |
<button class="" onclick="_login();" ><i class="fa fa-facebook-official fa-2x" aria-hidden="true"></i> | |
Continue with Facebook | |
</button> | |
# javascript/jquery | |
<script type="text/javascript"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#header file | |
<meta name="google-signin-client_id" content="{{your-google-client-id}}"> | |
#google js package to include | |
<script src="https://apis.google.com/js/platform.js?onload=renderButton" async defer></script> | |
#html button div | |
<div id="my-signin2"></div> | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#This is just a listing of the commands for generating your SSL certificates | |
#Run these commands one at a time from inside your ~/ssl folder | |
#Make sure you create your server.csr.cnf and your v3.ext files first inside the same folder | |
#private key generation | |
#This will ask you for a passphrase(password) do NOT lose this file or the password | |
openssl genrsa -des3 -out ~/ssl/rootCA.key 2048 | |
#create root certificate | |
openssl req -x509 -new -nodes -key ~/ssl/rootCA.key -sha256 -days 1024 -out ~/ssl/rootCA.pem |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[req] | |
default_bits= 2048 | |
prompt= no | |
default_md= sha256 | |
distinguished_name = dn | |
[dn] | |
C = Gurgaon | |
ST = HR | |
L = Gurgaon | |
O = End Point |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
authorityKeyIdentifier = keyid, issuer | |
basicConstraints = CA:FALSE | |
keyUsage = digitalSignature, nonRepudiation, keyEncipherment, dataEncipherment | |
subjectAltName = @alt_names | |
[alt_names] | |
DNS.1 = localhost |
NewerOlder