Put this on your wp-config.php
/* That's all, stop editing! Happy blogging. */
define('FS_METHOD', 'direct');
import useScrollRestoration from "utils/hooks/useScrollRestoration"; | |
const App = ({ Component, pageProps, router }) => { | |
useScrollRestoration(router); | |
return <Component {...pageProps} />; | |
}; | |
export default App; |
// Demonstration video can be found at: https://youtu.be/_gJyK1-NGq8 | |
// ModifyEC2InstanceType | |
const AWS = require('aws-sdk'); | |
exports.handler = (event, context, callback) => { | |
const { instanceId, instanceRegion, instanceType } = event; | |
const ec2 = new AWS.EC2({ region: instanceRegion }); |
Put this on your wp-config.php
/* That's all, stop editing! Happy blogging. */
define('FS_METHOD', 'direct');
Code is clean if it can be understood easily – by everyone on the team. Clean code can be read and enhanced by a developer other than its original author. With understandability comes readability, changeability, extensibility and maintainability.
php -d memory_limit=8000M artisan migrate:refresh --seed |
# Backup | |
docker exec CONTAINER /usr/bin/mysqldump -u root --password=root DATABASE > backup.sql | |
# Restore | |
cat backup.sql | docker exec -i CONTAINER /usr/bin/mysql -u root --password=root DATABASE | |
#!/bin/bash | |
# | |
# | |
# | |
# Start on runlevels 3, 4 and 5. Start late, kill early. | |
# chkconfig: 345 95 05 | |
# | |
# | |
#!/bin/bash |
# You don't need Fog in Ruby or some other library to upload to S3 -- shell works perfectly fine | |
# This is how I upload my new Sol Trader builds (http://soltrader.net) | |
# Based on a modified script from here: http://tmont.com/blargh/2014/1/uploading-to-s3-in-bash | |
S3KEY="my aws key" | |
S3SECRET="my aws secret" # pass these in | |
function putS3 | |
{ | |
path=$1 |
echo "PUT YOUR MAIL BODY HERE" | mailx -s "SUBJECT" -S smtp=smtp://yoursmtpserver.com -S smtp-auth=login -S smtp-auth-user=YOUR_USERNAME -S smtp-auth-password=YOUR_PASSWORD -S from="Sender Name <[email protected]>" [email protected] |
#!/usr/bin/env bash | |
# install mdbtools first! | |
# mdbtools: https://github.com/brianb/mdbtools | |
# ref: https://wiki.postgresql.org/wiki/Converting_from_other_Databases_to_PostgreSQL | |
DBMS=postgres | |
for MDB in `ls | grep .mdb$` |