So you committed to main instead of your feature branch? Oops! But it's ok. All commits in git are special little things that are easy to chip up and kick around ⚽
If you need to do any sleuthing first, use
git log
| def day_of_week(day, month, year) | |
| # Zeller's Rule - Jan/Feb are Month 13/14 of previous year | |
| if month < 3 | |
| month += 12 | |
| year -= 1 | |
| end | |
| k = year % 100 | |
| j = year / 100 | |
| # Zeller's congruence | |
| h = (day + (13 * (month + 1)) / 5 + k + (k / 4) + (j / 4) - (2 * j)) % 7 |
| People I've really worked with who have a website | |
| https://dominicbisset.co.uk/ | |
| https://mtempleheald.github.io/ | |
| https://michaelbanner.substack.com/ | |
| Internet friends and acquaintances | |
| https://muan.co/ | |
| https://livelaugh.blog/ | |
| https://pketh.org/ | |
| https://bentsai.org/ |
| What gift of grace is Jesus my redeemer, | |
| There is no more for heaven now to give | |
| He is my joy, my righteousness, and freedom | |
| My steadfast love, my deep and boundless peace | |
| To this I hold, my hope is only Jesus | |
| For my life is wholly bound to his | |
| Oh how strange and divine, I can sing: all is mine! | |
| Yet not I, but through Christ in me |
| public static class StringExtensions | |
| { | |
| public static string ReplaceFirst(this string target, string oldString, string newString) | |
| { | |
| int start = target.IndexOf(oldString); | |
| if (start < 0) | |
| return target; | |
| int end = start + oldString.Length; |
| <html> | |
| <head><style>div{margin:2em;} ul{padding:0;}</style> | |
| <body> | |
| <div> | |
| <ul> | |
| <li>Open the DevTools console</li> | |
| <li>Press Go</li> | |
| <li>Data will be fetched from server (<code>return await fetch().then()</code>)</li> | |
| <li>Press Go again</li> | |
| <li>Data will be returned locally from the async function (<code>return todos</code>)</li> |
| # == Check how many commits to move == | |
| git log | |
| # == Move commits to a new branch == | |
| # Creates the branch at current HEAD but doesn't check it out: | |
| git branch new-branch | |
| # Resets master/main/current back x commits | |
| git reset --keep HEAD~2 |
| String.prototype.toSentenceCase = function(){ return this.slice(0,1).toUpperCase() + this.slice(1) } |
| SELECT | |
| dm_mid.database_id AS DatabaseID, | |
| dm_migs.avg_user_impact*(dm_migs.user_seeks+dm_migs.user_scans) Avg_Estimated_Impact, | |
| dm_migs.last_user_seek AS Last_User_Seek, | |
| object_name(dm_mid.object_id,dm_mid.database_id) AS [TableName], | |
| 'CREATE INDEX [IX_' + object_name(dm_mid.object_id,dm_mid.database_id) + '_' | |
| + REPLACE(REPLACE(REPLACE(ISNULL(dm_mid.equality_columns,''),', ','_'),'[',''),']','') + | |
| CASE | |
| WHEN dm_mid.equality_columns IS NOT NULL AND dm_mid.inequality_columns IS NOT NULL THEN '_' | |
| ELSE '' |
| -- QUERY TO GET RUNNING PLAN HANDLES | |
| SELECT d.name, t.text,PLAN_HANDLE, r.total_elapsed_time/1000 RunningSeconds | |
| FROM sys.dm_exec_requests r | |
| JOIN sys.databases d on d.database_id = r.database_id | |
| CROSS APPLY sys.dm_exec_sql_text(sql_handle) t | |
| ORDER BY 4 DESC | |
| -- VISUALISE A PLAN HANDLE |