Skip to content

Instantly share code, notes, and snippets.

View sergeycherepanov's full-sized avatar
:bowtie:
Focusing

S.Cherepanov sergeycherepanov

:bowtie:
Focusing
View GitHub Profile
@ngobach
ngobach / 00_hackintosh.md
Last active November 3, 2019 17:20
Idiot's guide to hackintosh. https://git.io/vhwSM
@jchandra74
jchandra74 / openssl.MD
Last active February 16, 2024 21:23
HOWTO: Create Your Own Self-Signed Certificate with Subject Alternative Names Using OpenSSL in Ubuntu Bash for Window

HOWTO: Create Your Own Self-Signed Certificate with Subject Alternative Names Using OpenSSL in Ubuntu Bash for Window

Overview

My main development workstation is a Windows 10 machine, so we'll approach this from that viewpoint.

Recently, Google Chrome started giving me a warning when I open a site that uses https and self-signed certificate on my local development machine due to some SSL certificate issues like the one below:

Self-Signed SSL Issue in Chrome

@michaeljota
michaeljota / webpack-shell-plugin.js
Last active March 27, 2019 16:28
A webpack shell plugin to hock command after and before the build. All credits to original author: Yair Tavor. http://stackoverflow.com/a/35337516. I just classed it.
'use strict';
const exec = require('child_process').exec;
function puts(error, stdout, stderr) {
console.log(stdout);
}
class WebpackShellPlugin {
constructor(options) {
<pre>
<?php
$username = 'admin';
$key = 'd525e743ee692632b52a05570444aa537e06a8cc';
$created = date('c');
$nonce = substr(md5(time()), 0, 16);
$sha1 = sha1($nonce . $created . $key, true);
$digest = base64_encode($sha1);
echo "user: {$username}" . PHP_EOL;
@ruebenramirez
ruebenramirez / create-orders-programmatically.md
Created May 5, 2016 16:38
magento create orders programmatically
@gordonturner
gordonturner / KVM OVMF.md
Last active September 21, 2016 12:30
KVM OVMF
@novemberborn
novemberborn / setup.md
Created January 7, 2016 15:05
OS X Redirect ports 80 and 443 to 8080 and 8443 respectively

Changes with .dev domains in mind.

Create /etc/pf.anchors/dev, containing:

rdr pass inet proto tcp from any to any port 80 -> 127.0.0.1 port 8080
rdr pass inet proto tcp from any to any port 443 -> 127.0.0.1 port 8443

KVM OSX Guest 10.11 (El Capitan) with Clover

  • Some notes about this approach:
    • An OSX Installer USB drive for Install OS X El Capitan is created
    • Clover is then installed on the USB drive
    • Clover Configurator is then run on the USB drive
    • The USB drive contents are copied to the VM host
    • VNC is used to connect to the guest UI
  • The qxl virtual video device is used (part of the standard kvm qemu install)
@tuanpmt
tuanpmt / php7_build_ubuntu15.04.sh
Created December 4, 2015 07:32 — forked from m1st0/php_build_ubuntu.sh
Compiling PHP 7 on Ubuntu 15.04 with LDAP Support
#! /bin/bash
## PHP 7 Initial Compile ##
## Some help from the various places like these. ##
# http://www.zimuel.it/install-php-7/
# http://www.hashbangcode.com/blog/compiling-and-installing-php7-ubuntu
## Setup Ubuntu 15.04 ##
# I like the speed of Apt-Fast. Will check for installs some other day.
sudo apt-get install apt-fast
@Vinai
Vinai / or-example.php
Last active September 28, 2021 20:48
SearchCriteria OR Example for Magento 2
<?php
declare(strict_types = 1);
namespace Training5\VendorRepository\Controller\Test;
use Magento\Catalog\Api\Data\ProductInterface;
use Magento\Catalog\Api\ProductRepositoryInterface;
use Magento\Framework\Api\Filter;
use Magento\Framework\Api\FilterBuilder;