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
sed -i '/\uuid:/d' ./* | |
sed -i '/\default_config_hash:/d' ./* |
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
mysqldump --add-drop-table --no-data -u root -p -h localhost db_name | grep 'DROP TABLE' > drop_all_tables.sql | |
mysql -u root -p -h localhost db_name < drop_all_tables.sql |
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
parameters: | |
twig.config: | |
debug : true | |
auto_reload: true | |
cache: false |
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
const partialApply = (fn, ...fixedArgs) => { | |
return function (...remainingArgs) { | |
return fn.apply(this, fixedArgs.concat(remainingArgs)); | |
}; | |
} | |
const add = (a, b) => a + b; | |
const add10 = partialApply(add, 10); |
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
volume(10)(20)(3) // 600 |
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
// Adapted from: | |
// https://facebook.github.io/react/blog/2015/12/16/ismounted-antipattern.html | |
function cancellable(promise) { | |
let cancelled = false; | |
// Creates a wrapper promise to return. This wrapper is | |
// resolved or rejected based on the wrapped promise, and | |
// on the "cancelled" value. | |
const promiseWrapper = new Promise((resolve, reject) => { | |
promise.then( |
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 | |
phpinfo(); | |
?> |
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
# Add headers to all responses. | |
<IfModule mod_headers.c> | |
# Disable content sniffing, since it's an attack vector. | |
# Header always set X-Content-Type-Options nosniff | |
Header unset X-Frame-Options | |
</IfModule> |
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
BASE_PATH=/var/www/html | |
find $BASE_PATH/. -name ".git" -exec chown root:root -R {} \; | |
find $BASE_PATH/. -name ".git" -exec chmod a-rxw -R {} \; |
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
mysqldump --no-data --add-drop-table DB_NAME | grep ^DROP | mysql -v DB_NAME |