Skip to content

Instantly share code, notes, and snippets.

View be-geeky's full-sized avatar

Dushyant Joshi be-geeky

  • Mumbai
View GitHub Profile
@shinesoftware
shinesoftware / fix-duplicates-product-entity-varchar.php
Last active August 20, 2021 14:10
Magento 2: Reindex Error - 1062 Duplicate entry `catalog_product_index_eav_temp` (?, ?, ?, ?, ?)...
<?php
$conn = mysqli_connect("HOST", "USER", "PASS", "DATABASE");
if (!$conn) {
echo "Error: Unable to connect to MySQL." . PHP_EOL;
echo "Debugging errno: " . mysqli_connect_errno() . PHP_EOL;
echo "Debugging error: " . mysqli_connect_error() . PHP_EOL;
exit;
}
@0m3r
0m3r / build.js
Created December 26, 2018 15:29
Magento 2 Advanced js bundling config
{
// Usage:
// mv pub/static/frontend/Magento/luma/en_US pub/static/frontend/Magento/luma/en_US_orig
// r.js -o build.js baseUrl=pub/static/frontend/Magento/luma/en_US_origin dir=pub/static/frontend/Magento/luma/en_US
// Enable js minification with Uglify. Uncomment this out during development tomake builds faster
//optimize: 'none',
inlineText: true,
// Files that are required for all pages will be included in require.js file
deps: [
'jquery/jquery.cookie',
@GrzegorzBandur
GrzegorzBandur / Readme.md
Last active January 23, 2022 09:54
RESTful API with Symfony 4.4 + FOSRestBundle + FOSOauthServerBundle + FOSUserBundle

RESTful API with Symfony 4.4 + FOSRestBundle + FOSOauthServerBundle + FOSUserBundle

To start writing RestFull API in symfony we will need bundles:

        "friendsofsymfony/oauth-server-bundle": "^1.6",
        "friendsofsymfony/rest-bundle": "^2.7",
        "friendsofsymfony/user-bundle": "^2.1",
        "jms/serializer-bundle": "^3.5",
        "nelmio/api-doc-bundle": "^3.5",
        "sensio/framework-extra-bundle": "^5.2",
        "symfony/apache-pack": "^1.0",
@ibreakthecloud
ibreakthecloud / github-OAuth.php
Last active December 16, 2019 14:51
Complete PHP 7 code for Implementing OAuth via Github
<?php
session_start();
$code = $_GET['code'];
$url = 'https://github.com/login/oauth/access_token';
$client_id = 'xxxxxxxxxxxxxxxxxxxxxxx';
$client_secret = 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx';
// echo $code;
$postdata = http_build_query(
@rafaelstz
rafaelstz / Magento2-API-OAuth-based_authentication.php
Last active September 8, 2023 06:15
Sample files to use Magento 2 REST and SOAP API. Using Token-based authentication and OAuth-based authentication method.
<?php
function sign($method, $url, $data, $consumerSecret, $tokenSecret)
{
$url = urlEncodeAsZend($url);
$data = urlEncodeAsZend(http_build_query($data, '', '&'));
$data = implode('&', [$method, $url, $data]);
$secret = implode('&', [$consumerSecret, $tokenSecret]);
@keithweaver
keithweaver / domain-to-aws-ec2-instance.md
Created March 20, 2017 23:49
Point Domain to Amazon Web Services (AWS) EC2 Instance

Point Domain to Amazon Web Services (AWS) EC2 Instance

  1. Open the Amazon Route 53 console at https://console.aws.amazon.com/route53/.
  2. If you are new to Amazon Route 53, you see a welcome page; choose Get Started Now for DNS Management. Otherwise, choose Hosted Zones in the navigation pane.
  3. Choose Create Hosted Zone.
  4. For Domain Name, type your domain name.
  5. Choose Create.
  6. Click the Hosted Zone, edit record set.
  7. In the value, add ec2-54-152-134-146.compute-1.amazonaws.com.
  8. Change your DNS file to point to the IPv4 address (This would be in something like GoDaddy).
@kirilkirkov
kirilkirkov / gist:9a6ac60c2e35caca1e5eb75dfe33a153
Created April 13, 2016 13:41
Cannot connect to Mail: Can not authenticate to IMAP server: [ALERT] Please log in via your web browser: https://support.google.com/mail/acco
Error when try access gmail from php imap solution:
Login to your gmail account, enable imap.
Let the access here first: https://www.google.com/settings/security/lesssecureapps
Go to: https://accounts.google.com/b/0/DisplayUnlockCaptcha and enable access.