Skip to content

Instantly share code, notes, and snippets.

Félix Dion Robidoux fdrobidoux

Block or report user

Report or block fdrobidoux

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View MonoGame-scale-by-resolution.md
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);
@fdrobidoux
fdrobidoux / RectangleExtensions.cs
Created Jun 3, 2019
Dumb rectangle extension I wasted time on.
View RectangleExtensions.cs
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} }}";
@fdrobidoux
fdrobidoux / gist:d0a9870d8aa790b6c1f56fe3d6837667
Created Apr 13, 2018
Fallout 4 - Scripts for follower management
View gist:d0a9870d8aa790b6c1f56fe3d6837667
cqf FollowersExtension "EFF:CompanionManager.SetCompanion" RefID False False
--------------------------
FORCE DISMISS:
--------------------------
setconsolescopequest followers
emptyrefalias companion
setplayerteammate 0
--------------------------
View easy-dark-mode.css
/* Dark mode (see #466). */
html {
-webkit-filter: invert() hue-rotate(180deg) contrast(70%);
filter: invert() hue-rotate(180deg) contrast(70%);
}
html img {
-webkit-filter: invert() hue-rotate(180deg) contrast(120%);
filter: invert() hue-rotate(180deg) contrast(120%);
}
@fdrobidoux
fdrobidoux / function-properties-scope-tests.js
Created Jul 28, 2016
Some tests I've done involving `this` scopes and `function` object properties.
View function-properties-scope-tests.js
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);
View gist:c5b0f4be87eece26c86e
<?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');
}
View gist:c27b02e20be8e0dca6e6
<?php
/**
* WordPress Query Comprehensive Reference
* Compiled by luetkemj - luetkemj.com
*
* CODEX: http://codex.wordpress.org/Class_Reference/WP_Query
* Source: http://core.trac.wordpress.org/browser/tags/3.3.1/wp-includes/query.php
*/
$args = array(
You can’t perform that action at this time.