Skip to content

Instantly share code, notes, and snippets.

View maacpiash's full-sized avatar
🕶️
using System.Reflection;

Ahad Chowdhury maacpiash

🕶️
using System.Reflection;
View GitHub Profile
@davidfowl
davidfowl / MinimalAPIs.md
Last active May 1, 2024 20:58
Minimal APIs at a glance
@iam-doctor-j
iam-doctor-j / DataTable.tsx
Created February 27, 2021 16:07
DataTable component for React using MaterialUI
import { createStyles, Paper, Table, TableBody, TableContainer, TablePagination, Theme } from '@material-ui/core';
import { makeStyles, TableCell, TableHead, TableRow, TableSortLabel } from '@material-ui/core';
import React from 'react';
interface IDataTableColumn {
id: string
name: string,
enableSort?: boolean,
align?: "center" | "inherit" | "justify" | "left" | "right"
}
@davidfowl
davidfowl / server.cs
Last active September 20, 2021 13:56 — forked from DamianEdwards/server.cs
Simplified ASP.NET Core app exploration
#!/usr/bin/env dotnet run
var builder = WebApplication.CreateBuilder(args);
var config = builder.Configuration;
var connString = config["connectionString"] ?? "Data Source=todos.db";
builder.AddDbContext<TodoDb>(options => options.UseSqlite(connString));
builder.AddSqlite<Todo>(connString) // Higher level API perhaps?
var app = builder.Build();
@croaky
croaky / App.tsx
Last active July 25, 2021 19:55
Parcel + TypeScript + React
import * as React from 'react'
// routing, etc.
import { Reset } from '~/ui/shared/Reset'
export class App extends React.Component {
public render() {
return (
<div>
<title>Dashboard</title>
@Damovisa
Damovisa / azure-pipelines.yml
Created October 10, 2018 23:56
Azure Pipelines YML for ASP.NET Core
# ASP.NET Core
# Build and test ASP.NET Core projects targeting .NET Core.
# Add steps that run tests, create a NuGet package, deploy, and more:
# https://docs.microsoft.com/azure/devops/pipelines/languages/dotnet-core
pool:
vmImage: 'Ubuntu 16.04'
variables:
buildConfiguration: 'Release'
@bradtraversy
bradtraversy / docker-help.md
Last active May 4, 2024 14:32
Docker Commands, Help & Tips

Docker Commands, Help & Tips

Show commands & management commands

$ docker

Docker version info

@a7madgamal
a7madgamal / dark.md
Last active July 14, 2023 04:00
Dark mode for Slack on MacOS
@badcommandorfilename
badcommandorfilename / datepicker.cshtml
Created July 20, 2017 01:24
C# HTML5 input date datepicker MVC Razor
<!-- How to insert a date editor in a Razor view -->
<div class="form-group">
@Html.LabelFor(model => model.Start, htmlAttributes: new { @class = "control-label col-md-2" })
<div class="col-md-10">
@Html.TextBoxFor(model => model.Start, new { @type="date", @class = "form-control datepicker", @Value = Model.Start.ToString("yyyy-MM-dd") } )
@Html.ValidationMessageFor(model => model.Start, "", new { @class = "text-danger" })
</div>
</div>
@2E0PGS
2E0PGS / linux-usb-file-copy-fix.md
Last active April 29, 2024 15:21
Fix Ubuntu and other Linux slow/hanging file copying via USB.

If your running a x64 bit Ubuntu or other Linux and find USB transfers hang at the end apply this fix:

echo $((16*1024*1024)) > /proc/sys/vm/dirty_background_bytes
echo $((48*1024*1024)) > /proc/sys/vm/dirty_bytes

I suggest you edit your /etc/rc.local file to make this change persistant across reboots.

sudo nano /etc/rc.local