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
Here's how to make jQuery DataTables work with npm and webpack. DT checks for AMD compatibility first | |
which breaks when you're using CommonJS with webpack. | |
Install DT core: npm install datatables.net | |
Install a DT style: npm install datatables.net-bs (bootstrap) | |
Install the imports-loader webpack plugin: https://github.com/webpack/imports-loader#disable-amd | |
Create a loader "exception" just for DT in webpack.config.js: | |
module: { | |
loaders: [ |
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 UnityEngine; | |
using System.Collections; | |
[ExecuteInEditMode] | |
public class QuadTextureScaler : MonoBehaviour | |
{ | |
private Renderer rend; | |
private float textureWidthInUnits; | |
private float textureHeightInUnits; | |
private float pixelsPerUnit; |
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 DefaultPageController : PageControllerBase<PageTypeBase> | |
{ | |
public DefaultPageController(IContentRepository contentRepository) : base(contentRepository) | |
{ | |
} | |
public ActionResult Index(PageTypeBase currentPage) | |
{ | |
Type origType = currentPage.GetOriginalType(); |
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
[InitializableModule] | |
public class DependencyInstaller : IConfigurableModule | |
{ | |
public void ConfigureContainer(ServiceConfigurationContext context) | |
{ | |
var container = context.StructureMap(); | |
DependencyResolver.SetResolver(new StructureMapDependencyResolver(container)); | |
context.Services.Add<SiteSettings>(sl => |
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
Combination of: | |
https://gist.github.com/Ta180m/e1471413f62e3ed94e72001d42e77e22 | |
https://askubuntu.com/questions/1252007/opening-ubuntu-20-04-desktop-on-wsl2 | |
(Use the script in the last link in your .bashrc to automatically setup and start both VcXsrv+gnome correctly). | |
Then: | |
Allow VcXsrv in Windows firewall (otherwise you will get a black screen) | |
Now you can put this on a Windows second desktop, and switch between Windows and Ubuntu! : - D | |
If you want to switch seamlessly between virtual desktops without ubuntu being minimized, replace -fullscreen with -nodecoration in the .bashrc script. |