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
| Technical Plan for New Feature | |
| Create a technical plan for this feature, in this chat, no MD files for [story link] | |
| ------------------------------------------------------------------------------------ | |
| Multiple Stories in Parallel | |
| Look at all of the stories where I am assigned as the developer and let me know | |
| which stories we can work in parallel in this chat |
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 a new migration | |
| Add-Migration <MigrationName> -Project AdamsTax.Modules.API -StartupProject AdamsTax.Modules.API | |
| Add-Migration AD-853-AddsAccessCodeTables -Project AdamsTax.Modules.API -StartupProject AdamsTax.Modules.API | |
| In Visual Studio, go to Tools > NuGet Package Manager > Package Manager Console. | |
| Add-Migration AD-853_AddPrintingAccessRelationships -Project AdamsTax.Modules.API -StartupProject AdamsTax.Modules.API -Context ApiDataContext | |
| # Update the database to the latest migrationfrom the Package Manager Console | |
| - Run from inside Visual Studio and have the src\Modules\API\AdamsTaxAPI project selected in the Default project drop down list. |
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 | |
| $memtest = new Memcached(); | |
| $memtest->addServer("127.0.0.1", 11211); | |
| $conn = mysql_connect("localhost", "tzvsqktpzm", "XWwgPDZ52R") or die(mysql_error()); | |
| mysql_select_db("tzvsqktpzm") or die(mysql_error()); | |
| $query = "SELECT ID FROM sample_data WHERE name = 'some_data'"; | |
| $retval = mysql_query( $query, $conn ); | |
| $result = mysql_fetch_array($retval, MYSQL_ASSOC); | |
| $querykey = "KEY" . md5($query); | |
| $memtest->set($querykey, $result); |
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
| --/////////////////////////////////////////////// | |
| -- TRIAGE | |
| --///////////////////////////////////////////// | |
| -- Check table sizes | |
| SELECT t.name AS TableName, SUM(p.rows) AS RowCounts | |
| FROM sys.tables AS t | |
| INNER JOIN sys.partitions AS p ON t.object_id = p.object_id | |
| WHERE p.index_id IN (0,1) -- Heap or Clustered Index | |
| GROUP BY t.name |
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
| MVC-Razor AJAX | |
| // AJAX calls .NET MVC Core Controller | |
| // Stores success message and fetches it to display once page is updated | |
| function confirmTransferAction(event) { | |
| // console.log("@Url.Action("UpdateAccountEmail", "CustomerProfiles")"); | |
| var id = document.getElementById('adminId').value; | |
| var email = document.getElementById('newEmail').value; |
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
| USE [Database_Name] GO -- | |
| Check if the procedure exists before renaming | |
| IF OBJECT_ID('dbo.AdminReportsStaples', 'P') IS NOT NULL | |
| BEGIN | |
| EXEC sp_rename 'dbo.AdminReportsStaples', 'AdminReportsRevenue' | |
| END | |
| ELSE | |
| BEGIN | |
| PRINT 'Procedure dbo.AdminReportsStaples does not exist.' | |
| END |
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
| // 1) 'ref' | |
| // ref keyword means "pass by reference" - edits | |
| // made in this function affect the actual variable | |
| int someNum = 5; | |
| AddOne(ref someNum); | |
| // someNum now = 6 | |
| void AddOne(ref int i) | |
| { |
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
| Save the username and password globally: | |
| git config --global user.name "fname lname" | |
| git config --global user.email "example@gmail.com" | |
| git config --global user.password "secret" | |
| Get a specific setting, | |
| git config --global --get user.name | |
| git config --global --get user.email | |
| git config --global --get user.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
| using Microsoft.EntityFrameworkCore; | |
| using Microsoft.EntityFrameworkCore.Diagnostics; | |
| using AdamsTaxAPI.Data; | |
| using AdamsTaxAPI.Data.MagentoServiceCalls; | |
| using AdamsTaxAPI.Models; | |
| using AdamsTaxAPI.Controllers; | |
| using Azure.Identity; | |
| using Azure.Security.KeyVault.Secrets; | |
| using Aczure.Extensions.AspNetCore.Configuration.Secrets; | |
| using Reni.SshNet.Sftp; |
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
| var dapperParams = new List<KeyValuePair<object, object>>() { | |
| new KeyValuePair<string, string>("FirstName", "Chris"), | |
| new KeyValuePair<string, string>("LastName", "Money"), | |
| new KeyValuePair<string, string>("Phone", "314-555-1212"), | |
| new KeyValuePair<string, string>("SSN", "123-45-6789"), | |
| new KeyValuePair<string, int>("Age", 21) | |
| }; | |
| connection.Query<Person>(query, new {dapperParams}); |
NewerOlder