find ~/repos -type d \( -name "vendor" -o -name "node_modules" \) -exec du -sh {} \; -maxdepth 2
find ~/repos -type d ( -name "vendor" -exec du -sh {} ; -o -name "node_modules" -exec du -sh {} ; ) -exec rm -rf {} ; -maxdepth 2
<?php | |
// place this code inside a php file and call it f.e. "download.php" | |
$path = $_SERVER['DOCUMENT_ROOT']."/path2file/"; // change the path to fit your websites document structure | |
$fullPath = $path.$_GET['download_file']; | |
if ($fd = fopen ($fullPath, "r")) { | |
$fsize = filesize($fullPath); | |
$path_parts = pathinfo($fullPath); | |
$ext = strtolower($path_parts["extension"]); |
#!/bin/bash | |
BLUETOOTH_DIR=/var/lib/bluetooth | |
for CONTROLLER_DIR in ${BLUETOOTH_DIR}/*; do | |
CONTROLLER_MAC=$(basename ${CONTROLLER_DIR}) | |
if [ -d "${CONTROLLER_DIR}" ] && [[ $CONTROLLER_MAC =~ ^([0-9A-F]{2}[:]){5}([0-9A-F]{2})$ ]] ; then | |
for DEVICE_DIR in ${CONTROLLER_DIR}/*; do | |
DEVICE_MAC=$(basename ${DEVICE_DIR}) | |
if [ -d "${DEVICE_DIR}" ] && [[ $DEVICE_MAC =~ ^([0-9A-F]{2}[:]){5}([0-9A-F]{2})$ ]] ; then |
#!/usr/bin/env bash | |
# Automatically finds your php version, installs, and enables the blackfire extension on your current php. | |
source ~/.phpbrew/bashrc | |
EXTENSION_URL="https://packages.blackfire.io/binaries/blackfire-php/1.27.0/blackfire-php-linux_amd64-php-VERSION.so" | |
PHP_VERSION=$(php -r 'echo PHP_MAJOR_VERSION . PHP_MINOR_VERSION;') | |
EXT_DIR=$(phpbrew path ext) |
find ~/repos -type d \( -name "vendor" -o -name "node_modules" \) -exec du -sh {} \; -maxdepth 2
find ~/repos -type d ( -name "vendor" -exec du -sh {} ; -o -name "node_modules" -exec du -sh {} ; ) -exec rm -rf {} ; -maxdepth 2
function Set-PasswordRemotely { | |
[CmdletBinding(DefaultParameterSetName = 'Secure')] | |
param( | |
[Parameter(ParameterSetName = 'Secure', Mandatory)][string] $UserName, | |
[Parameter(ParameterSetName = 'Secure', Mandatory)][securestring] $OldPassword, | |
[Parameter(ParameterSetName = 'Secure', Mandatory)][securestring] $NewPassword, | |
[Parameter(ParameterSetName = 'Secure')][alias('DC', 'Server', 'ComputerName')][string] $DomainController | |
) | |
Begin { | |
$DllImport = @' |
repos: | |
- hooks: | |
- id: trailing-whitespace | |
- id: check-docstring-first | |
- id: check-json | |
- id: pretty-format-json | |
- id: check-merge-conflict | |
- id: check-yaml | |
- id: debug-statements | |
- id: name-tests-test |
This script will gather the extensions currently installed for VSCodium and update them from marketplace.visualstudio.com automatically.
$SKIP
are ignored.<?php | |
declare(strict_types=1); | |
use Rector\CodeQuality\Rector\Class_\CompleteDynamicPropertiesRector; | |
use Rector\Config\RectorConfig; | |
use Rector\Core\ValueObject\PhpVersion; | |
use Rector\DowngradePhp74\Rector\ArrowFunction\ArrowFunctionToAnonymousFunctionRector; | |
use Rector\Set\ValueObject\LevelSetList; | |
use Rector\Set\ValueObject\SetList; | |
use Rector\Visibility\Rector\ClassMethod\ExplicitPublicClassMethodRector; |
#!/bin/zsh | |
confirm=1 | |
while getopts c flag; do | |
case "${flag}" in | |
c) confirm= ;; | |
esac | |
done | |
relink() { |
<?php | |
$source = file_get_contents("readfile.json"); | |
$target = sprintf("<?php\n\nreturn = %s", JSONToPHPArrayConverter::convert($source)); | |
file_put_contents("output.php", $target); | |
class JSONToPHPArrayConverter | |
{ | |
/** |