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
$scriptPath = split-path -parent $MyInvocation.MyCommand.Definition | |
$logFile = Join-Path "C:\inetpub\logs\LogFiles\W3SVC2" "upload_logs.logFile" | |
Try | |
{ | |
$files = Get-ChildItem -Filter *.log | where-object {$_.lastwritetime -lt (Get-Date).AddHours(-1)} | |
$processedDir = Join-Path $scriptPath "uploaded_to_s3" | |
if ($files.count -gt 0) { | |
Write-Output "Starting Uploads to S3" | Out-File $logFile -Append |
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.Text; | |
var RegFieldEncoding = new Dictionary<(int reg, int w), string>() | |
{ | |
{ (0b000, 0), "al" }, | |
{ (0b000, 1), "ax" }, | |
{ (0b001, 0), "cl" }, | |
{ (0b001, 1), "cx" }, |
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
{ | |
"$schema": "https://aka.ms/terminal-profiles-schema", | |
"alwaysShowTabs": true, | |
"copyOnSelect": false, | |
"defaultProfile": "{574e775e-4f2a-5b96-ac1e-a2962a402336}", | |
"disabledProfileSources": [ | |
"Windows.Terminal.Azure" | |
], | |
"initialCols": 120, | |
"initialRows": 30, |
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
userCustom.onReady = function() { | |
var ace = {} | |
ace.require = require | |
ace.define = define | |
ace.require(["ace/lib/net"], function(acenet) { | |
acenet.loadScript("//cdnjs.cloudflare.com/ajax/libs/ace/1.1.01/keybinding-vim.js", function() { | |
e = document.querySelector(".ace_editor").env.editor | |
ace.require(["ace/keyboard/vim"], function(acevim) { | |
e.setKeyboardHandler(acevim.handler); | |
}); |
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
CREATE OR REPLACE FUNCTION upsert_user() | |
RETURNS trigger AS | |
$upsert_user$ | |
declare | |
existing record; | |
begin | |
if (select EXISTS(select 1 from users where user_id = NEW.user_id)) then | |
select user_name, user_class, user_age into strict existing from users where user_id = new.user_id; |
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
protected override void Draw(GameTime gameTime) | |
{ | |
GraphicsDevice.Clear(Color.CornflowerBlue); | |
if (_testRenderTarget) | |
{ | |
_spriteBatch.Begin(SpriteSortMode.Immediate); | |
GraphicsDevice.SetRenderTarget(_renderTarget); | |
_spriteBatch.Draw(_guiTexture, new Rectangle(0, 0, 64, 64), new Rectangle(0, 0, 64, 64), Color.White); | |
_spriteBatch.End(); |
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
public class Game1 : Game | |
{ | |
private GraphicsDeviceManager _graphics; | |
SpriteBatch _spriteBatch; | |
private bool _testRenderTarget = false; | |
private Texture2D _guiTexture; | |
private RenderTarget2D _renderTarget; | |
public Game1() |
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
// _guiTexture is a texture of a bunch of gui images (buttons, scrollbars panels ect) | |
// srcRectangle in this case is the source rectange of a 64x64 button | |
// create render target | |
// if I set this to the same size of the backbuffer it draws how i expect it, but for some reason | |
// changing the width/height of this is changing the look when drawn to the screen... | |
// this doesn't make sense to me because i'm only using 64x64 pixels of this big area...changing it's size | |
// shouldn't have any effect in my mind | |
Canvas = new RenderTarget2D(Graphics, 800, 600) |
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 Xunit; | |
public class MyTests | |
{ | |
[Fact] //This means this is a test | |
public void TestMyGetMethodWorks() | |
{ | |
var journalService = new JournalService(/* not sure what kinda constructor you have */); |
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
/// <summary> | |
/// Class that provides the Watermark attached property | |
/// </summary> | |
public static class WatermarkService | |
{ | |
/// <summary> | |
/// Watermark Attached Dependency Property | |
/// </summary> | |
public static readonly DependencyProperty WatermarkProperty = DependencyProperty.RegisterAttached( | |
"Watermark", |
NewerOlder