This file contains 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
const { adapter } = require('./lambdaAdapter') | |
exports.handler = async (event, context) => await adapter(event, context, options) |
This file contains 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
# -Tail grabs the previous N lines, -Wait will watch the file and log out the changes to the session. | |
Get-Content ./mylog.log -Tail 5 –Wait |
This file contains 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
function getDataUrl(file) { | |
return new Promise((resolve, reject) => { | |
var reader = new FileReader(); | |
reader.readAsDataURL(file); | |
reader.onload = () => resolve(reader.result); | |
reader.onerror = err => reject(err); | |
}); | |
}; |
This file contains 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
# Source: https://hub.docker.com/_/mongo | |
# Use root/example as user/password credentials | |
version: '3.1' | |
services: | |
mongo: | |
image: mongo | |
restart: always | |
# You can uncomment this to set a password, but I use it locally with no auth for testing. |
This file contains 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
# Whenever a new commit is added to 'master', this build will trigger. | |
trigger: | |
- master | |
# Use an Azure VM with Ubuntu to build this poroject. | |
pool: | |
vmImage: 'ubuntu-latest' | |
# Our first step preps the VM to build our project. | |
steps: |
This file contains 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
# Stored in "~/Documents/Windows PowerShell". Any commands in this file will be executed when a session is launched. | |
function prompt { | |
"PS ($(Split-Path -leaf -path (Get-Location)))> " | |
} |
This file contains 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
if((Get-IISSite -Name "IisSiteName") -eq $true) { | |
# The site exists, do something | |
} else { | |
# The site doesnt exist. | |
} |
This file contains 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
#!/bin/bash | |
docker-compose down -v # Takes down the docker containers including named volumes | |
docker-compose build # Build the image | |
docker-compose up -d # Start the container |
This file contains 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
const Discord = require('discord.js'); | |
const client = new Discord.Client(); | |
// When the bot is ready, log out a message. | |
client.on('ready', () => { | |
console.log(`Logged in as ${client.user.tag}!`); | |
}); | |
// When a message is received that starts with 'hello', respond with 'world!' | |
// This is where you would handle various commands that your bot responds to. |
This file contains 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
using System; | |
using NSubstitute; | |
using Stage.Data; | |
using System.IO; | |
using System.Linq; | |
using System.Security.Principal; | |
using System.Web; | |
namespace FakerTools | |
{ |