Skip to content

Instantly share code, notes, and snippets.

View jwill9999's full-sized avatar
💭
working

Jason Williams jwill9999

💭
working
View GitHub Profile
@jwill9999
jwill9999 / Program.cs
Last active December 9, 2018 17:10
c# Dump function - reflection GetMethods
namespace Dump {
class Program {
static void Main(string[] args)
{
Type mytype = (typeof(MyTypeClass));
// Get the public methods - bind the return types public etc
MethodInfo[] myArrayMethodInfo = mytype.GetMethods(BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly);
// Display the number of methods
@jwill9999
jwill9999 / README.md
Created December 4, 2018 19:59
Add Bower Packages in Visual Studio Asp.net core 2.1

Adding Bower Packages to ASP.Net 2.1

Add Bower Packages

  • In Toolbar Project => Quick Install Packages (shortcut => shift Alt 0)
  • Choose Bower
  • Type in Package Name e.g Bootstrap
  • Choose the Version and click Install
  • Create in root of solution two files
  • Bower.json
@jwill9999
jwill9999 / README.md
Last active December 3, 2018 12:18
Seeding a MySQL database in Visual Studio

Seeding Data into MySQL Database Visual Studio




@jwill9999
jwill9999 / README.md
Last active November 22, 2018 15:50
Graphql Node Setup

Set up Graphql Node Server

  1. In index.js/server.js add an end point for graphql
const graphqlHTTP = require('express-graphql');
const schema = require('./schema/schema');
@jwill9999
jwill9999 / package.json
Last active November 22, 2018 15:07
Quokka Create-React-App
{
"quokka": {
"babel": {
"presets": ["react-app"]
},
"plugins": [
"jsdom-quokka-plugin"
]
}
}
@jwill9999
jwill9999 / README.md
Created October 28, 2018 23:30
React typescript command

React Typescript create react app

create-react-app my-app --scripts-version=react-scripts-ts

Generate vscode react typescript snippets / Extension

vscode-react-typescript

article

@jwill9999
jwill9999 / Dockerfile
Last active October 25, 2018 21:52
docker in production and testing
FROM drupal:8.5
RUN apt-get update && apt-get install -y git \
&& rm -rf /var/lib/apt/lists/*
# this next part was corrected in 2018 to be more clear on how you'd typically
# customize your own theme. first you need to clone the theme into this repo
# with something like downloading the lastest theme for bootstrap
# https://www.drupal.org/project/bootstrap and extract into themes dir on host.
@jwill9999
jwill9999 / README.md
Last active October 25, 2018 21:35
docker dev environment files

Instructions

In development you must use a file based secret however in production this can be set to use the

docker secret create [OPTIONS] SECRET [file|-]

In production swarm / stack docker-compose file below.

@jwill9999
jwill9999 / vim_cheatsheet.md
Created October 8, 2018 17:40 — forked from awidegreen/vim_cheatsheet.md
Vim shortcuts

Introduction

  • C-a == Ctrl-a
  • M-a == Alt-a

General

:q        close
:w        write/saves
:wa[!]    write/save all windows [force]
:wq       write/save and close
@jwill9999
jwill9999 / .eslintrc
Last active September 23, 2018 21:57
Eslint and Prettier configuration for JavaScript VSCode
module.exports = {
"env": {
"mocha": true
},
"extends":[
"airbnb-base",
"prettier"
],
"plugins": [