defaults write com.apple.screencapture location /path/
killall SystemUIServer
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
xcode-select --install | |
# Install dependencies | |
brew install wget autoconf openssl libjpeg libpng lzlib curl imap-uw readline postgresql libxml2 mcrypt gettext libxslt homebrew/dupes/libiconv icu4c expat bison webp freetype | |
# Dirs | |
mkdir -p /Applications/MAMP/bin/php/php7.1.12/include | |
cd /Applications/MAMP/bin/php/php7.1.12/include | |
# Download PHP 7.1.12 sources |
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
@ECHO OFF | |
Setlocal EnableDelayedExpansion | |
set INPUT=C:\Users\Administrator\Desktop\ffmpeg-20180410-d64183e-win64-static\ffmpeg-20180410-d64183e-win64-static\bin\A1 | |
set OUTPUT=C:\Users\Administrator\Desktop\ffmpeg-20180410-d64183e-win64-static\ffmpeg-20180410-d64183e-win64-static\bin\A2 | |
: encode video | |
for %%i in ("input\*.mp4") DO ffmpeg -i "%%i" -ss 00:00:05 -to 00:12:57 -c copy "output/%%~ni.mp4" | |
pause | |
REM -i: This specifies the input file. In that case, it is (input.mp4). | |
REM -ss: Used with -i, this seeks in the input file (input.mp4) to position. |
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
for %%i in ("output\*.mp4") DO ffmpeg -i "%%i" -i watermark.png -filter_complex "overlay=1110:85" -pix_fmt yuv420p -c:a copy "%%~ni.mp4" | |
pause | |
:: ffmpeg -i input.mp4 -i image.png \ | |
::-filter_complex "[0:v][1:v] overlay=25:25:enable='between(t,0,20)'" \ | |
::-pix_fmt yuv420p -c:a copy \ | |
::output.mp4 |
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
DROP FUNCTION IF EXISTS fn_remove_accents; | |
DELIMITER | | |
CREATE FUNCTION fn_remove_accents( textvalue VARCHAR(10000) ) RETURNS VARCHAR(10000) | |
BEGIN | |
SET @textvalue = textvalue; | |
-- ACCENTS | |
SET @withaccents = 'ŠšŽžÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÑÒÓÔÕÖØÙÚÛÜÝŸÞàáâãäåæçèéêëìíîïñòóôõöøùúûüýÿþƒàáạảãâầấậẩẫăằắặẳẵèéẹẻẽêềếệểễìíịỉĩòóọỏõôồốộổỗơờớợởỡùúụủũưừứựửữỳýỵỷỹđÀÁẠẢÃÂẦẤẬẨẪĂẰẮẶẲẴÈÉẸẺẼÊỀẾỆỂỄÌÍỊỈĨÒÓỌỎÕÔỒỐỘỔỖƠỜỚỢỞỠÙÚỤỦŨƯỪỨỰỬỮỲÝỴỶỸĐ'; |
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 initctl list |grep rabbit | |
rabbitmq-notif start/running, process 18499 | |
rabbitmq-rest-api-batch start/running, process 18526 | |
rabbitmq-synch start/running, process 18490 | |
rabbitmq-user_data start/running, process 18546 | |
rabbitmq-rest-api-batch-mail start/running, process 18537 | |
rabbitmq-threaded-rest-api-batch stop/waiting | |
rabbitmq-legacy-importer start/running, process 18516 | |
rabbitmq-img start/running, process 18479 |
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
public function massDownloadAction(Request $request) { | |
$documentids = $request->get('documentids', []); | |
$dir = $this->container->getParameter('documents_dir'); | |
$repo = $this->getDoctrine()->getManager()->getRepository(Documents::class); | |
// Create new Zip Archive. | |
$zip = new \ZipArchive(); | |
$now = date("Y-m-d H-i-s"); | |
$zipName = 'Documents-' . $now . '.zip' ; | |
$zip->open($zipName, \ZipArchive::CREATE); | |
foreach ($documentids as $id) { |
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
<html> | |
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.min.js"></script> | |
<script> | |
$(document).ready(function (){ | |
$("#click").click(function (){ | |
$('html, body').animate({ | |
scrollTop: $("#div1").offset().top | |
}, 2000); | |
}); | |
}); |
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
# To enable CORS you should add lines with CORS rules below to your valet.conf file | |
# Find the file /usr/local/etc/nginx/valet/valet.conf - this is Valet conf for Nginx | |
# of try to execute `locate valet.conf` and find the `valet.coinf` in `nginx` subdirectory | |
# after you edit your valet.conf do not forget to execute `valet restart` | |
server { | |
listen 80 default_server; | |
root /; | |
charset utf-8; | |
client_max_body_size 128M; |
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
https://sourabhbajaj.com/mac-setup/iTerm/tree.html |