This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# You'll need to install dotnet-ef cli if you haven't already | |
dotnet tool install --global dotnet-ef | |
# Begin scaffolding database | |
dotnet ef dbcontext scaffold "server=127.0.0.1;uid=root;pwd=password;database=classicmodels" Pomelo.EntityFrameworkCore.MySql |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE USER 'shane'@'localhost' IDENTIFIED BY 'password'; | |
GRANT ALL PRIVILEGES ON *.* TO 'shane'@'localhost' WITH GRANT OPTION; | |
CREATE USER 'shane'@'%' IDENTIFIED BY 'password'; | |
GRANT ALL PRIVILEGES ON *.* TO 'shane'@'%' WITH GRANT OPTION; | |
FLUSH PRIVILEGES; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
upstream example_site { | |
server 127.0.0.1:4000; | |
} | |
upstream example_api { | |
server 127.0.0.1:5000; | |
} | |
server { | |
root /var/www/example.com/dist/example/browser; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Why does initial setup of Mongo always give me permission issues? | |
mongosh | |
use admin | |
db.createUser( | |
{ | |
user: "adminUser", | |
pwd: passwordPrompt(), | |
roles: [ | |
{ role: "userAdminAnyDatabase", db: "admin" }, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Generate GPG key | |
# Sample Output: | |
# /home/shane/.gnupg/pubring.kbx | |
# ------------------------------ | |
# sec rsa3072/12345ABCDE 2021-11-12 [SC] [expires: 2023-11-12] | |
# 123456789 | |
# uid [ultimate] Shane Duffy <[email protected]> | |
# ssb rsa3072/12345ZZZZZ 2021-11-12 [E] [expires: 2023-11-12] | |
gpg --gen-key | |
gpg --list-secret-keys --keyid-format LONG |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Get GPG keys | |
# | |
# Sample Output: | |
# sec rsa3072 2021-11-12 [SC] [expires: 2023-11-12] | |
# 12345ABCDE | |
# uid [ultimate] Shane Duffy <[email protected]> | |
# ssb rsa3072 2021-11-12 [E] [expires: 2023-11-12] | |
gpg --list-secret-keys [email protected] | |
# Export GPG key to file |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Vimium Standard | |
// @namespace https://shaneduffy.io | |
// @version 0.1 | |
// @description Standard Notes changed their UI, and now it doesn't work with Vimium. This makes things work with Vimium again. | |
// @author Shane Duffy | |
// @match https://app.standardnotes.com | |
// @icon https://shaneduffy.io/assets/img/logo-circle-64.png | |
// @grant none | |
// ==/UserScript== |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"version": "0.2.0", | |
"configurations": [ | |
{ | |
"name": "Node Launch", | |
"command": "npm run start", | |
"request": "launch", | |
"type": "node-terminal", | |
"serverReadyAction":{ | |
"action": "startDebugging", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"version": "2.0.0", | |
"tasks": [ | |
{ | |
"label": "build", | |
"command": "dotnet", | |
"type": "process", | |
"args": [ | |
"build", | |
"${workspaceFolder}/example-api.csproj", |
NewerOlder