This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace MyNamespace; | |
use Symfony\Component\HttpKernel\Bundle\Bundle; | |
use Doctrine\DBAL\Types\Type; | |
class DataBundle extends Bundle | |
{ | |
/** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
use InvalidArgumentException; | |
use ReflectionClass; | |
/** | |
* Base Enum class | |
* Require PHP >= 5.3 | |
* | |
* @author Ton Sharp <[email protected]> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import logging | |
from StringIO import StringIO as StringBuffer | |
logger = logging.getLogger('basic_logger') | |
logger.setLevel(logging.DEBUG) | |
### Setup the console handler with a StringIO object | |
log_capture_string = StringBuffer() | |
# log_capture_string.encoding = 'cp1251' | |
ch = logging.StreamHandler(log_capture_string) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo port -v install intltool py27-pygtk py27-gobject3 libvirt gtk3 libvirt | |
cd $HOME | |
# Sources: | |
# compile what you need from here https://github.com/jeffreywildman/homebrew-virt-manager | |
cd $HOME | |
git clone https://github.com/virt-manager/virt-manager | |
# Change destination install directory instead of /usr, due to |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# RPM license exporter | |
# Copyright 2022 [email protected] | |
extract_file() { | |
# echo "$1" | |
# echo "$2" | |
rpm2cpio "$1" | cpio -iv --to-stdout ".$2" 1> license.tmp 2> /dev/null | |
ENCODING=$(uchardet license.tmp) | |
# echo "$ENCODING" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Based on https://gist.github.com/kmatt/71603170556ef8ffd14984af77ff10c5 | |
# prompt ">" indicates Powershell commands | |
# prompt "$" are Linux shell commands | |
# https://learn.microsoft.com/en-us/windows/wsl/install | |
> dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart | |
> dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart | |
# No need for Windows 11, but for Windows 10 install https://wslstorestorage.blob.core.windows.net/wslblob/wsl_update_x64.msi |
OlderNewer