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
| // noinspection ES6CheckImport | |
| import PropTypes from 'prop-types'; | |
| import React, {useState} from 'react'; | |
| import {CopyToClipboard} from 'react-copy-to-clipboard'; | |
| import IconButton from '@material-ui/core/IconButton'; | |
| import CopyIcon from '@material-ui/icons/FileCopy'; | |
| import Snackbar from '@material-ui/core/Snackbar'; | |
| import makeStyles from '@material-ui/core/styles/makeStyles'; | |
| const useStyles = makeStyles(theme => ({ |
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
| using System.Web; | |
| using Microsoft.AspNet.Identity; | |
| using Microsoft.AspNet.Identity.Owin; | |
| using System.Net.Http; | |
| using Microsoft.Owin; | |
| using Microsoft.AspNet.Identity.EntityFramework; | |
| using System.Data.Entity.Migrations; | |
| namespace MyWebsite.Repositories.Tests | |
| { |
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 | |
| add_action('rest_api_init', function() { | |
| // Create url /wp-json/cs/v1/projects | |
| register_rest_route('cs/v1', '/projects', [[ | |
| 'methods' => \WP_REST_Server::READABLE, | |
| 'callback' => function($request) { | |
| // Get all the posts for your CPTUI post type | |
| $posts = get_posts(['posts_per_page' => -1, 'post_type' => 'projects']); | |
| // Add all the fields from ACP to the meta field. | |
| foreach($posts as &$post) { |
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
| <manifest xmlns:android="http://schemas.android.com/apk/res/android" | |
| package="com.codingsimply.project"> | |
| <uses-permission android:name="android.permission.INTERNET" /> | |
| <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /> | |
| <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /> | |
| </manifest> |
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] | |
| user=database_username | |
| password=database_password |
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
| ## This will work on windows/powershell and linux/bash | |
| scp -r user@server.com:/remote/folder/location/to/get/ .\local\parent\directory | |
| ## The folder get will be created in .\local\parent\directory so you will see | |
| ## .\local\parent\directory\get\ |
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
| # Most of this script will work on bash/linux and powershell/windows. | |
| ## Dump SQL to remote location. | |
| ssh user@server.com "mysqldump -P3306 -hmysql.server.com -u dbuser database > contents.sql" | |
| ## Get remote SQL dump file and transfer it locally. | |
| scp -rp user@server.com:/remote/sql/dump/location/contents.sql C:\Temp\ | |
| ## Remove the remote SQL Dump. | |
| ssh user@server.com "rm contents.sql" | |
| ## Powershell only. | |
| ## Replace any strings in the sql dump. |
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
| // I modified the widget so each entry will have a data-id attribute with the url for the detail view. | |
| var html = '<table>'; | |
| $('table.archive-list tr').each(function() { | |
| var url = $(this).find('span:first').attr('data-id'); | |
| var name = $(this).find('td a').text(); | |
| html += '<tr><td>' + name + '</td><td>' + url + '</td></tr>'; | |
| }); | |
| $('body').html(html + '</table>'); |