Parameter | YouTube recommends setting |
---|---|
-movflags faststart | moov atom at the front of the file (Fast Start) |
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
* text=auto | |
###### Git | |
.gitattributes text | |
.gitignore text | |
.gitconfig text | |
.gitmodules text | |
##### Windows | |
*.bat text eol=crlf |
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
--- PSQL queries which also duplicated from https://github.com/anvk/AwesomePSQLList/blob/master/README.md | |
--- some of them taken from https://www.slideshare.net/alexeylesovsky/deep-dive-into-postgresql-statistics-54594192 | |
-- I'm not an expert in PSQL. Just a developer who is trying to accumulate useful stat queries which could potentially explain problems in your Postgres DB. | |
------------ | |
-- Basics -- | |
------------ | |
-- Get indexes of tables |
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/bash | |
#Find all link files | |
ls -ltr `find . -maxdepth 1 -type l -print` | |
#Find and remove all files whose modified time is greater than 30 days | |
find . -type f -mtime +30 -exec rm {} \; | |
#Find particular word across files in same directory | |
find . -type f | xargs grep -l "searched_word" |
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/bash | |
# variables | |
LOGFILE="/var/log/nginx/access.log" | |
LOGFILE_GZ="/var/log/nginx/access.log.*" | |
RESPONSE_CODE="200" | |
# functions | |
filters(){ | |
grep $RESPONSE_CODE \ |
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 | |
// Simply place the following two functions in _support/Helper/Acceptance.php | |
// Then you can call $I->verifyRedirect(...) inside your tests | |
namespace Helper; | |
class Acceptance extends \Codeception\Module | |
{ | |
/** | |
* Ensure that a particular URL does NOT contain a 301/302 |
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/bash | |
#To execute it directly: sudo bash <(curl -s https://gist.githubusercontent.com/agarzon/ecb0b92d4c8e1bbde126534c76721a58/raw/install-php-tools.sh) | |
BIN_PATH=/usr/local/bin/ | |
#COMPOSER | |
sudo curl -LsS https://getcomposer.org/composer.phar -o ${BIN_PATH}composer | |
sudo chmod a+x ${BIN_PATH}composer |
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 | |
interface InterfaceCommand { | |
function execute(); | |
} | |
abstract class AbstractCommand implements InterfaceCommand { | |
/** |
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
From this [issue](https://github.com/puphpet/puphpet/issues/1025#issuecomment-157059174): | |
I know that this issue is closed, but as I spent a lot of time to understand what was going on, I made some researches and I can explain why this happen, and you can fix it. | |
Using git config core.autocrlf true can help, but not on a multi-developpers project. | |
This command has to be the same on each developper machine, and that's not always the case. | |
You have to use the .gitattributes provided in the puphpet archive and edit it as follow (carefull, this file need to be in your project root) | |
You also need to use an IDE that allow you to save/edit files as LF (like phpstorm). You can check the type of the file in the bottom right corner, in the status bar (you'll see LF or CRLF while a file is opened) |
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
print("UPDATE AUG 2023: this script is beyond old and broken") | |
print("You may find interesting and more up to date resources in the comments of the gist") | |
exit() | |
from slacker import Slacker | |
import json | |
import argparse | |
import os | |
# This script finds all channels, private channels and direct messages |