Skip to content

Instantly share code, notes, and snippets.

View imclint21's full-sized avatar

clint21.eth ⚡️ imclint21

View GitHub Profile
@imclint21
imclint21 / ApplicationDbContext.cs
Last active July 3, 2021 12:02
Install Identity with EntityFramework in .Net 5
public class ApplicationDbContext : IdentityDbContext<ApplicationUser>
{
// public DbSet<Model> Model { get; set; }
public ApplicationDbContext(DbContextOptions<ApplicationDbContext> dbContextOptions) : base(dbContextOptions)
{
}
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
using System.IO;
using System.Collections.Generic;
using System.Globalization;
using CsvHelper;
using Newtonsoft.Json;
namespace JsonToCsv
{
public class Program
{
@imclint21
imclint21 / eventSource.js
Last active April 23, 2020 16:53
Consume Lucid KV SSE with Chartist
var labelData = [];
var serieData = [];
var chart = new Chartist.Line('#ct-chart', { labels: labelData, series: [serieData] },
{
fullWidth: true,
chartPadding: { left: 0, right: 0 }
});
// Connect to the SSE (Public node on Heroku)
var eventSource = new EventSource("https://lucid-kv.herokuapp.com/notifications");
@imclint21
imclint21 / play.sh
Last active August 12, 2020 20:05
Play with Lucid
curl -X PUT -d "Hey" https://lucid-kv.herokuapp.com/api/kv/hello_world
# {"message":"The specified key was successfully created."}
curl https://lucid-kv.herokuapp.com/api/kv/hello_world
# Hey
curl -X DELETE https://lucid-kv.herokuapp.com/api/kv/hello_world
# {"message":"The specified key and it's data was successfully deleted"}
@imclint21
imclint21 / RustSpa.rs
Created August 2, 2019 15:21
Making an SPA Application In Rust with Rocket
#![feature(plugin)]
#![plugin(rocket_codegen)]
extern crate rocket;
use std::io;
use std::path::{Path, PathBuf};
use rocket::response::NamedFile;
@imclint21
imclint21 / RustSpa.rs
Created August 2, 2019 15:21
Making an SPA Application In Rust with Rocket
#![feature(plugin)]
#![plugin(rocket_codegen)]
extern crate rocket;
use std::io;
use std::path::{Path, PathBuf};
use rocket::response::NamedFile;
@imclint21
imclint21 / ApiExplorerGetsOnlyConvention.cs
Created July 29, 2019 02:42
[Swashbuckle.AspNetCore] Display only ApiController controllers in the swagger
using System.Linq;
using Microsoft.AspNetCore.Mvc.ApplicationModels;
namespace MyProgram
{
public class ApiExplorerGetsOnlyConvention : IActionModelConvention
{
public void Apply(ActionModel action)
{
action.ApiExplorer.IsVisible = action.Controller.Attributes.Any(x => x.GetType() == typeof(Microsoft.AspNetCore.Mvc.ApiControllerAttribute));
@imclint21
imclint21 / ssl_proxy.config
Created July 16, 2019 14:41 — forked from paulswartz/ssl_proxy.config
SSL Forwarding Proxy w/ nginx
# run as 'nginx -p . -c ssl_proxy.config'
daemon off;
http {
server {
listen localhost:8443;
server_name localhost;
ssl on;
ssl_certificate ../pooling-ui/certs/server.crt;
@imclint21
imclint21 / launch.json
Created May 22, 2019 16:53
VueJs Debugging in VsCode
{
"version": "0.2.0",
"configurations": [
{
"type": "node",
"request": "launch",
"name": "yarn",
"runtimeExecutable": "yarn",
"runtimeArgs": [
"serve"

Keybase proof

I hereby claim:

  • I am clintnetwork on github.
  • I am clint_network (https://keybase.io/clint_network) on keybase.
  • I have a public key ASCed7XJ6h4jKzYO2HcXiOF2U_LaHD0SqHsrpV81DfUEQQo

To claim this, I am signing this object: