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
<?php | |
/* | |
* Add this code to your theme's functions.php file | |
*/ | |
// Theme activation | |
add_action("after_switch_theme", "theme_activated"); | |
function theme_activation_hook(){ | |
error_log('theme activated'); | |
} |
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 Foo() { | |
this.bar = "foo"; | |
} | |
Foo.prototype.use = (function (_instance, _name) { | |
return Object.assign(function use() { | |
// console.log("false: ", _fn.hello); | |
// console.log("false: ", _fn.aBar); | |
console.log("true: ", _instance.bar); | |
console.log("true: ", this.use.hello); |
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
cqf FollowersExtension "EFF:CompanionManager.SetCompanion" RefID False False | |
-------------------------- | |
FORCE DISMISS: | |
-------------------------- | |
setconsolescopequest followers | |
emptyrefalias companion | |
setplayerteammate 0 | |
-------------------------- |
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
/** | |
* 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
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
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
### 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: |
OlderNewer