$ find . -name '.php' -not -wholename '/Loader/Autoloader.php' -not -wholename '*/Application.php' -print0 | xargs -0 sed -i -E 's/(require_once)/// \1/g'
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
$ find . -name ".svn" -exec rm -rf {} \; | |
OR | |
$ find . -name ".svn" -delete |
https://trac.ffmpeg.org/wiki/Encode/VP8 https://sites.google.com/a/webmproject.org/wiki/ffmpeg http://wiki.webmproject.org/ffmpeg/vp9-encoding-guide
ffmpeg -i "input.mov" -q:v libvpx -crf 10 -b:v 1M -q:a libvorbis output.webm
There's regularly updated spreadsheet available listing all ffmpeg arguments valid for VP8 (and maybe VP9) encoding: https://docs.google.com/spreadsheets/d/1SU6hqVQ7AvCl52q05h0JW1IPDRLXaqm-0zanlMG7GYg
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
#!/bin/sh | |
# Tiny script to create a mysql user and database with same | |
# name. A random password is generated (yay!) | |
usage() { | |
cat << __EOT | |
Usage: createmysqldb.sh <dbname> | |
where <dbname> is the one-word name you'd like to use as database name and | |
username if -u parameter is not set. | |
Options: |
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 | |
# Prompt for Yes/No answer | |
# $1 - question | |
# $2 - default answer (Y|N) | |
ask() { | |
while true; do | |
if [ "${2:-}" = "Y" ]; then | |
prompt="Y/n" |
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
# Overview on SSH port forwarding: http://blog.trackets.com/2014/05/17/ssh-tunnel-local-and-remote-port-forwarding-explained-with-examples.html | |
# Example of MySQL database connection tunnel using a jump host | |
ssh -F ./ssh.cfg -nNT -L 33060:localhost:3306 remotehost | |
# ./.ssh.cfg contents | |
Host bastion | |
Hostname 8.8.8.8 | |
User bastion-user |
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
--- ./src/Controller/FieldablePathController.php 2017-05-18 11:51:40.000000000 +0200 | |
+++ ./src/Controller/FieldablePathController.php 2017-05-18 11:59:01.000000000 +0200 | |
@@ -43,7 +43,7 @@ | |
->load($params[$entity_type]); | |
// Make sure the current entity exists and contains path field. | |
- if (empty($entity) || !$entity->hasField('path')) { | |
+ if (empty($entity) || !(method_exists($entity, 'hasField') && $entity->hasField('path'))) { | |
return; | |
} |
OlderNewer