private const float RESOLUTION_W = 1280;
private const float RESOLUTION_H = 720;
float scaleW = graphics.GraphicsDevice.Viewport.TitleSafeArea.Width / RESOLUTION_W;
float scaleH = graphics.GraphicsDevice.Viewport.TitleSafeArea.Height / RESOLUTION_H;
scale = new Vector2(scaleW, scaleH);
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
/* Based on https://github.com/zealdocs/zeal/blob/master/src/app/resources/browser/assets/css/darkmode.css */ | |
html { | |
-webkit-filter: invert() hue-rotate(180deg) contrast(70%); | |
filter: invert() hue-rotate(180deg) contrast(70%); | |
background: #333; | |
} | |
html img { | |
-webkit-filter: invert() hue-rotate(180deg) contrast(120%); | |
filter: invert() hue-rotate(180deg) contrast(120%); |
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 static class TextureHelper | |
{ | |
public static Texture2D FillMaskColor(this GraphicsDevice device, Texture2D mask, Color color) | |
{ | |
Texture2D _texture = new Texture2D(device, mask.Width, mask.Height); | |
Color[] _buttonData = new Color[mask.Width * mask.Height]; | |
Color[] _maskData = new Color[mask.Width * mask.Height]; | |
mask.GetData(_maskData); | |
for (Int32 i = 0; i < _maskData.Length; ++i) |
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 System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using System.Threading.Tasks; | |
using Octokit; | |
namespace ConsoleApp | |
{ | |
public class Program |
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
### Keybase proof | |
I hereby claim: | |
* I am fdrobidoux on github. | |
* I am fdrobidoux (https://keybase.io/fdrobidoux) on keybase. | |
* I have a public key ASDgtN1PTn7ej_PDxCxM_2TTfzZInd21xJM923CGO-_yRQo | |
To claim this, I am signing this object: |
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
import random | |
import math | |
mapsize = 35 | |
def print_chart(i, noise): | |
outstr = '' | |
for i in noise: | |
if (i > 0.75): |
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
let subscribers = {}; | |
module.exports = { | |
publish(event, data) { | |
if (!subscribers[event]) return; | |
subscribers.forEach(callback => { | |
callback(data); | |
}) | |
}, |
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
/** | |
* Example with `is` that creates a casted item. | |
*/ | |
public void onSomethingHappens(object sender, EventArgs args) | |
{ | |
if (sender is XmlDocument xmlDoc) | |
{ | |
} |
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 Microsoft.Xna.Framework; | |
using System; | |
using System.Collections.Generic; | |
using System.Text; | |
namespace MonoTycoon.Core.Physics | |
{ | |
public static class RectangleExtensions | |
{ | |
private const string BASE_FORMAT_STR = "{0} {{ {1} }}"; |
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
cqf FollowersExtension "EFF:CompanionManager.SetCompanion" RefID False False | |
-------------------------- | |
FORCE DISMISS: | |
-------------------------- | |
setconsolescopequest followers | |
emptyrefalias companion | |
setplayerteammate 0 | |
-------------------------- |