Skip to content

Instantly share code, notes, and snippets.

View Darkace01's full-sized avatar
✍️
On C#

Kazeem Quadri Darkace01

✍️
On C#
View GitHub Profile
@Darkace01
Darkace01 / html5-editable-table.markdown
Created December 6, 2018 02:29
HTML5 Editable Table

HTML5 Editable Table

Create and edit an HTML5 table without the use of a library. Uses HTML5's contenteditable and minimal JavaScript.

A Pen by giovanni on CodePen.

License.

@Darkace01
Darkace01 / index.html
Created April 9, 2019 09:37
Simple #5
<div id="controls"></div>
@Darkace01
Darkace01 / countrydropdown.html
Created August 6, 2019 08:59 — forked from danrovito/countrydropdown.html
HTML Country Select Dropdown List
<label for="country">Country</label><span style="color: red !important; display: inline; float: none;">*</span>
<select id="country" name="country" class="form-control">
<option value="Afghanistan">Afghanistan</option>
<option value="Åland Islands">Åland Islands</option>
<option value="Albania">Albania</option>
<option value="Algeria">Algeria</option>
<option value="American Samoa">American Samoa</option>
<option value="Andorra">Andorra</option>
<option value="Angola">Angola</option>
@Darkace01
Darkace01 / kazeem.omp.json
Last active November 4, 2021 23:14
Oh My Posh Theme
{
"blocks": [
{
"type": "prompt",
"alignment": "left",
"segments": [
{
"type": "session",
"style": "diamond",
"foreground": "#ffffff",
using namespace System.Management.Automation
using namespace System.Management.Automation.Language
if ($host.Name -eq 'ConsoleHost')
{
Import-Module PSReadLine
}
oh-my-posh --init --shell pwsh --config C:\github\prompt\kazeem.omp.json | Invoke-Expression
@Darkace01
Darkace01 / settings.json
Created November 4, 2021 22:59
Windows Terminal Settings
{
"$schema": "https://aka.ms/terminal-profiles-schema",
"actions": [
{
"command": {
"action": "copy",
"singleLine": false
},
"keys": "ctrl+c"
},
git update-index --assume-unchanged file-name.extension
@Darkace01
Darkace01 / Rename Column or table
Created March 24, 2022 08:12
SQL Server script to rename column or table
-- Rename Table
exec sp_rename '[dbo].[Old_Table_Name]', 'New_Table_Name'
-- Rename Column
EXEC sp_rename 'TableName.Old_Column_Name', 'New_Column_Name', 'COLUMN'
@Darkace01
Darkace01 / add-element.js
Last active April 5, 2022 15:28
Initialize a map
userRoles.set(john, 'admin');
@Darkace01
Darkace01 / api-update.cs
Last active April 6, 2022 05:37
.Net 6 Minimal API
using Microsoft.EntityFrameworkCore;
var builder = WebApplication.CreateBuilder(args);
builder.Services.AddDatabaseDeveloperPageExceptionFilter();
builder.Services.AddDbContext<TodoDb>(opt => opt.UseInMemoryDatabase("TodoList"));
var app = builder.Build();
app.MapGet("/todoitems", async (TodoDb db) =>
await db.Todos.Select(x => new TodoItemDTO(x)).ToListAsync());