This file contains hidden or 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
wget -i list_of_urls_file -P destination_folder | |
brew install mmv | |
find . -type f ! -name "*.*" | mmv '*' '#1.jpg' |
This file contains hidden or 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
composer require drupal/console:~1.0 \ | |
--prefer-dist \ | |
--optimize-autoloader \ | |
--sort-packages \ | |
--no-update |
This file contains hidden or 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
<component name="ProjectRunConfigurationManager"> | |
<configuration default="false" name="Built-in" type="PhpBuiltInWebServerConfigurationType" factoryName="PHP Built-in Web Server" singleton="true" document_root="$PROJECT_DIR$/www" port="8080"> | |
<method /> | |
</configuration> | |
</component> |
This file contains hidden or 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
exiftool -Duration /path/to/file.gif |
This file contains hidden or 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
$ = $ || wmjQuery || jQuery | |
setTimeout(function(){ | |
$('nav').remove(); | |
$('.composer-panel').remove(); | |
$('div[target-selector=".main-container"]').remove(); | |
$('nav.primary-navbar').remove(); | |
$('#room-chat-nav').remove(); | |
$('#room-nav').remove(); | |
$('body').css('overflow-y', 'scroll'); | |
$('body').css('height', '10000px'); |
This file contains hidden or 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 | |
/** | |
* @file | |
* findNewUrls.drush | |
* | |
* This script tries to find a new url based on old one. | |
* Old urls should be placed in the same dir as a script file, | |
* and named as url-list.php, use php array format to add more old urls. | |
* | |
* Here is a finding logic. |
This file contains hidden or 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 | |
// drush php-script update_product_displays.drush | |
$time = time(); | |
$prev_timestamp = $time - (15 * 60); | |
$efq = new EntityFieldQuery(); | |
$efq | |
// Conditions on the entity - its type and its bundle ("sub-type") | |
->entityCondition('entity_type', 'node') |
This file contains hidden or 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
version: "2" | |
services: | |
mariadb: | |
image: wodby/mariadb:10.2-3.0.2 | |
# image: wodby/mariadb:10.1-3.0.2 | |
environment: | |
MYSQL_ROOT_PASSWORD: password | |
MYSQL_DATABASE: drupal | |
MYSQL_USER: drupal |
This file contains hidden or 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
drush sqlq "UPDATE users_field_data SET mail = '[email protected]' WHERE mail = '[email protected]'" | |
drush cr |
This file contains hidden or 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 | |
$zip = new ZipArchive; | |
if ($zip->open('archive.zip') === TRUE) { | |
$zip->extractTo('./destDir'); | |
$zip->close(); | |
echo 'ok'; | |
} |