In Git you can add a submodule to a repository. This is basically a repository embedded in your main repository. This can be very useful. A couple of advantages of using submodules:
- You can separate the code into different repositories.
| 'use client' | |
| import { test } from './server' | |
| import { useServerAction } from './hook' | |
| export default function Home() { | |
| const { data, loading, error, execute: testAction } = useServerAction(test) | |
| if (loading) return <div>Loading...</div> | |
| if (error) return <div>Error: {error.message}</div> |
| const { createLogger, format, transports } = require('winston') | |
| const moment = require('moment') | |
| // set default log level. | |
| const logLevel = 'info' | |
| var logger = createLogger({ | |
| level: logLevel, | |
| levels: { | |
| fatal: 0, |
| """ | |
| # App Engine import data from Datastore Backup to localhost | |
| You can use this script to import large(ish) App Engine Datastore backups to your localohst dev server. | |
| ## Getting backup files | |
| Follow instructions from Greg Bayer's awesome article to fetch the App Engine backups: | |
| http://gbayer.com/big-data/app-engine-datastore-how-to-efficiently-export-your-data/ |
| const fs = require('fs'); | |
| const path = require('path'); | |
| /** | |
| * Replaces tailwind 0.x color CSS classes with 1.0 names | |
| * E.g. "bg-grey-light" is replaced with "bg-gray-400" | |
| * | |
| * This is a "dumb" replacement that searches for string patterns across the | |
| * specified files, | |
| * |
| # Steps we will take: | |
| # 1. Change Local (Docker Machine) image type (this will take a bit) | |
| # 2. Resize image | |
| # 3. Resize partion | |
| # | |
| # Also see: https://docs.docker.com/articles/b2d_volume_resize/ | |
| # IMPORTANT: Make sure Local is not running! | |
| VM_NAME="local-by-flywheel" | |
| NEW_DISK_SIZE=50000 |
| /** | |
| * How to link into the WordPress Customizer | |
| */ | |
| Simple Link: | |
| <a href="<?php echo esc_url( admin_url( 'customize.php' ) ); ?>">Link to Customizer</a> | |
| Link to Panel: | |
| $query['autofocus[panel]'] = 'nav_menus'; |
| // Use Gists to store code you would like to remember later on | |
| console.log(window); // log the "window" object to the console |