Skip to content

Instantly share code, notes, and snippets.

View 0x15f's full-sized avatar
:shipit:
Shipping shit

Jake Casto 0x15f

:shipit:
Shipping shit
View GitHub Profile
@0x15f
0x15f / graphql-add-product-custom-option-ae5c89e5af2c14dea33b5c5d49ead84d55fd02f8.patch
Last active August 23, 2023 21:46
Magento2 GraphQL cannot add product with customizable option to cart #37599 #37652
From ae5c89e5af2c14dea33b5c5d49ead84d55fd02f8 Mon Sep 17 00:00:00 2001
From: Shomi Adarsh <shomi.adarsh@gds.ey.com>
Date: Thu, 22 Jun 2023 13:48:07 +0530
Subject: [PATCH] GraphQL cannot add product with customizable option to cart
#37599
---
vendor/magento/module-quote/Model/Quote.php | 2 ++
1 file changed, 2 insertions(+)
const express = require('express')
const app = express()
const port = 3001
app.get('/', async (req, res) => {
try {
const puppeteer = require('puppeteer')
const browser = await puppeteer.launch({
headless: true,
name: "Deploy to Production"
on:
push:
branches:
- production
jobs:
build:
runs-on: ubuntu-latest
steps:
@0x15f
0x15f / warmly.sh
Created May 28, 2019 17:25 — forked from thomasfr/warmly.sh
A wget based easy poor man`s cache warmer script
#!/bin/bash
# warmly.sh
# A wget based, easy, poor man`s cache warmer script
# https://gist.github.com/thomasfr/7926314
# The MIT License (MIT)
#
# Copyright (c) 2013,2014 Thomas Fritz <fritztho@gmail.com> (http://fritzthomas.com)
#
@0x15f
0x15f / handle_csv.php
Last active April 11, 2018 13:22
Simple PHP Script allows you to handle uploaded CSV files w/ empty columns/headers
<?php
$file = file($_FILES['file-name']['tmp_name']);
$csv_rows = array_map('str_getcsv', file($_FILES['customer-csv']['tmp_name']));
$csv_header = array_filter(array_shift($csv_rows));
$merged = [];
foreach($csv_rows as $row) {
$row = array_filter($row);
while(count($row) !== count($csv_header)) {
if(count($row) > count($csv_header)) {
@0x15f
0x15f / AES-256 encryption and decryption in PHP and C#.md
Created March 21, 2018 02:07
AES-256 encryption and decryption in PHP and C#

AES-256 encryption and decryption in PHP and C#

Update: There is a more secure version available. Details

PHP

<?php

$plaintext = 'My secret message 1234';
#!/bin/bash
mkdir -p work
cd work
curl -fsSL https://downloads.php.net/~pollita/php-7.2.3.tar.xz | tar -xJf - --strip-components=1
./configure \
--disable-cgi \
--enable-mbstring \
#!/bin/bash
# Requirements: curl, sudo, tar, building tools
[ -z "${PREFIX}" ] && PREFIX=/usr/local
[ -w "${PREFIX}" ] || SUDO=sudo
set -e
mkdir -p work
sudo apt-get update && sudo apt-get dist-upgrade -y
sudo apt-get install -y screen
sudo apt-get install -y npm
sudo apt-get install -y libpangocairo-1.0
sudo apt-get install -y libx11-xcb1
sudo apt-get install -y libxcomposite-dev
sudo apt-get install -y libxcursor1
sudo apt-get install -y libxdamage1
sudo apt-get install -y libxi6 libgconf-2-4
sudo apt-get install -y libxtst6
#!/bin/bash
PREFIX=$@
if [ -z $PREFIX ]; then
PREFIX="/usr/local"
fi
# Ensure you have write permissions to PREFIX
sudo mkdir $PREFIX
sudo chown -R `whoami` $PREFIX