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
Controller with all resources: | |
php artisan make:controller {ControllerName} --resource | |
Controller / Model / Migration | |
php artisan make:model {ModelName} -crm | |
Seed | |
php artisan make:seeder {ModelName}Seeder | |
Run Seed: |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> | |
<meta name="description" content=""> | |
<meta name="" content=""> | |
<title>Tabulator Template</title> |
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
composer create-project --prefer-dist laravel/laravel <Project Name> | |
composer require livewire/livewire && npm install && npm install -D tailwindcss@latest postcss@latest autoprefixer@latest && npx tailwindcss init | |
tailwind.config.js: | |
purge: [ | |
'./resources/**/*.blade.php', | |
'./resources/**/*.js', | |
'./resources/**/*.vue', | |
], | |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<title></title> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<meta name="description" content=""> | |
<meta name="" content=""> | |
<!-- CSS --> |
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
The easiest way to convert FoxPro to Microsoft SQL Server is to copy the FoxPro file to a CSV and use the SQL Server Import and Export Wizard. | |
In FoxPro | |
use NameOfFile (or ?) | |
copy to NameOfFile type csv | |
This will give you a clean CSV with a header line. |
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
Here is an easy way to get CPU information from the command line: | |
wmic cpu get /format:list | |
Below is examples of some of the information provided from the command: | |
Description | |
L2 Cache | |
L3 Cache | |
Max Clock Speed |
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
The first way is to create a temporary table and insert values into it. | |
DECLARE @declareTable TABLE (seq int, name VARCHAR(5) ) ; | |
INSERT INTO @declareTable (seq,name) values | |
(1,'one'), | |
(2,'two'), | |
(3,'three') | |
select * from @declareTable as dt; |
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
Over the years extracting the filename from a full path has always been a pain for me. Working with C#, I discovered a one line, easy to use, solution. | |
FileName = FileName.Split('\\')[FileName.Split('\\').Count() - 1]; | |
Filename = “c:\TextFile.txt” | |
Will return: | |
“TextFile.txt” |
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
Create User | |
------------ | |
sudo adduser <new user> && sudo su - <new user> && cd /home/<new user> | |
Create SSH | |
---------- | |
mkdir .ssh && chmod 700 .ssh && touch .ssh/authorized_keys && chmod 600 .ssh/authorized_keys | |
ssh-keygen -f <new user> && cat <new user>.pub >> /home/<new user>/.ssh/authorized_keys | |
Copy Private Key To Give to New User |
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
*/5 * * * * curl http://www.example.com | |
Add/Edit CRON job: | |
crontab -e | |
VIM Commands: | |
Insert a line - ESC -> I | |
Save - :w | |
Quit - :q |