Skip to content

Instantly share code, notes, and snippets.

View TakesTheBiscuit's full-sized avatar

Paul TakesTheBiscuit

  • United Kingdom
  • 02:33 (UTC +01:00)
View GitHub Profile
@TakesTheBiscuit
TakesTheBiscuit / ImportProductsCommand.php
Created May 1, 2024 11:05 — forked from nicanaca0/ImportProductsCommand.php
Simple CSV Product importer for Sylius. Includes the product, the variant, channel pricing, taxons images and associations (1.0.0-beta.2)
<?php
namespace AppBundle\Command;
use Sylius\Component\Core\Model\ChannelPricingInterface;
use Sylius\Component\Core\Model\ProductInterface;
use Sylius\Component\Core\Model\ProductVariantInterface;
use Sylius\Component\Product\Model\ProductAssociationInterface;
use Sylius\Component\Product\Model\ProductAssociationTypeInterface;
use Sylius\Component\Taxonomy\Model\TaxonInterface;
@TakesTheBiscuit
TakesTheBiscuit / open_and_close_cd_tray.py
Last active January 2, 2024 16:52 — forked from ricardo-valerio/open_and_close_cd_tray.py
Open and close CD/DVD Tray in python with Windows fix specific drive letter
#!/usr/bin/python3
from platform import system as platform_name
from os import system
import ctypes
platforms_dictionary = {
"Windows": { #
"open" : 'ctypes.windll.WINMM.mciSendStringW(u"open L: type CDAudio alias L_drive", None, 0, None); ctypes.windll.WINMM.mciSendStringW(u"set L_drive door open", None, 0, None)',
"close": 'ctypes.windll.WINMM.mciSendStringW(u"open L: type CDAudio alias L_drive", None, 0, None); ctypes.windll.WINMM.mciSendStringW(u"set L_drive door closed", None, 0, None)'