Skip to content

Instantly share code, notes, and snippets.

View jack2jm's full-sized avatar

Jatin Mandanka jack2jm

View GitHub Profile
@jack2jm
jack2jm / gravatar_function.php
Created July 22, 2019 05:11 — forked from itsbalamurali/gravatar_function.php
Simple PHP Gravatar Function
<?php
/**
Load a gravatar.
*/
function gravatar($email = '', $rating = 'pg') {
$default = "path/to/defava.png"; // Set a Default Avatar
$email = md5(strtolower(trim($email)));
$gravurl = "http://www.gravatar.com/avatar/$email?d=$default&s=60&r=$rating";
return '<img src="'.$gravurl.'" width="60" height="60" border="0" alt="Avatar">';
@jack2jm
jack2jm / .htaccess
Created July 7, 2022 04:14 — forked from morcegon/.htaccess
.htaccess optimized for laravel
# Apache configuration file
# httpd.apache.org/docs/2.2/mod/quickreference.html
# Note .htaccess files are an overhead, this logic should be in your Apache
# config if possible: httpd.apache.org/docs/2.2/howto/htaccess.html
# Techniques in here adapted from all over, including:
# Kroc Camen: camendesign.com/.htaccess
# perishablepress.com/press/2006/01/10/stupid-htaccess-tricks/
# Sample .htaccess file of CMS MODx: modxcms.com
Install mongodb extention - Windows
---
1. Download php_mongodb.dll from pecl mongodb php - latest stable dll
2. Put that DLL to localhost Xampp/php/ext
3. add line to php.ini - extension=php_mongodb.dll
4. restart Xampp server.
Download Mongodb Compass for local software to check Data
-------
@jack2jm
jack2jm / setup_mongodb.txt
Created August 9, 2023 05:27 — forked from Bhavya8181/setup_mongodb.txt
Setup Mongodb in Ubantu/Windows & intigrate with Laravel
Reference Link
==============
1. Server connect - https://adevait.com/laravel/using-laravel-with-mongodb
2. Crud - https://www.javatpoint.com/mongodb-crud-in-laravel
3. Basic in local - https://www.geeksforgeeks.org/how-to-install-mongodb-on-laravel-project/
4. Setup mongodb in ubantu - https://www.mongodb.com/docs/manual/tutorial/install-mongodb-on-ubuntu/
Install mongodb extention - Windows
===================================
Error:
dpkg: error processing package mysql-server (--configure): dependency problems - leaving unconfigured No apport report written because the error message indicates its a followup error from a previous failure.
Errors we re encountered while processing: mysql-server-8.0 mysql-server E: Sub-process /usr/bin/dpkg returned an error code
Step to encount the error:
1. sudo apt-get clean
2. sudo apt-get purge mysql*
3. sudo apt-get updateYou10:58
4. sudo apt-get purge mysql*
@jack2jm
jack2jm / Setup Laravel Project in windows server
Last active May 27, 2024 06:55 — forked from Bhavya8181/Setup Laravel Project in windows server
setup & install require packege for setup laravel project in windows server iis
Ref Link
======================
Free SSL windows
https://gist.github.com/jack2jm/0aebaea31f467581e0bc7b599a485a0a
youtube video
https://www.youtube.com/watch?v=YMMFfAad3y8
https://www.youtube.com/watch?v=1p985k-sGoc
Enable IIS windows
https://help.claris.com/en/server-installation-configuration-guide/content/enabling-iis-windows.html
Add CGI module
Full Doc to learn react
--------------------------------
https://docs.google.com/document/d/1xlMUk6OMMF42X3w1ZG94BnKcmbGI7f5FoF1kCyCBC9Q/edit?usp=sharing
Installations + SSL React
https://medium.com/@poudel.01anuj/deploying-reactjs-project-on-the-linux-server-with-ssl-certificate-https-aa14bf2737aa
--------------------------------
In react js you can store&use enviorment variable
- Create .env file in root of project
@jack2jm
jack2jm / README.md
Created April 3, 2024 03:54 — forked from lopspower/README.md
Hexadecimal color code for transparency

Hexadecimal color code for transparency

Twitter

How to set transparency with hex value ?

For example, you want to set 40% alpha transparence to #000000 (black color), you need to add 66 like this #66000000.

Download This sample on Google Play Store