Skip to content

Instantly share code, notes, and snippets.

@AustinEast
AustinEast / haxeflixel-pixel-perfect.md
Last active May 6, 2024 15:07
Pixel perfect rendering with HaxeFlixel on desktop targets

To get Haxeflixel to maintain 1:1 pixel rendering at any scale for desktop targets:

In your Project.xml, add a new window property with an desktop conditional, resizable set to false, and the desired width/height to match the resolution you'd like to maintain.

<window if="desktop" resizable="false" width="320" height="180" />

Apply a shader to the FlxGame instance or the main FlxCamera instance as a filter. The base FlxShader can even just be used if the project doesn't require custom shaders.

FlxG.game.setFilters([new ShaderFilter(new FlxShader())]);
# To use this, you need Python 3.5+ and pip.
#
# 1. Make a new Discord app with a bot. https://discordapp.com/developers/applications/
#
# 2. Set environment variable SIMPLEWORDS_TOKEN on your computer to the bot's Token.
# Unix/Mac: export SIMPLEWORDS_TOKEN=MzABCDefghIJKLmnopQRSTuv.EnZ3kg.b5bdD74CKCr3du679hkemGJ7R7N
# PowerShell: $env:SIMPLEWORDS_TOKEN='MzABCDefghIJKLmnopQRSTuv.EnZ3kg.b5bdD74CKCr3du679hkemGJ7R7N'
#
# 3. Invite the bot to your server: https://stackoverflow.com/a/37743722/257418
#
@gbaman
gbaman / HowToOTGFast.md
Last active May 14, 2024 10:26
Simple guide for setting up OTG modes on the Raspberry Pi Zero, the fast way!

Setting up Pi Zero OTG - The quick way (No USB keyboard, mouse, HDMI monitor needed)

More details - http://blog.gbaman.info/?p=791

For this method, alongside your Pi Zero, MicroUSB cable and MicroSD card, only an additional computer is required, which can be running Windows (with Bonjour, iTunes or Quicktime installed), Mac OS or Linux (with Avahi Daemon installed, for example Ubuntu has it built in).
1. Flash Raspbian Jessie full or Raspbian Jessie Lite onto the SD card.
2. Once Raspbian is flashed, open up the boot partition (in Windows Explorer, Finder etc) and add to the bottom of the config.txt file dtoverlay=dwc2 on a new line, then save the file.
3. If using a recent release of Jessie (Dec 2016 onwards), then create a new file simply called ssh in the SD card as well. By default SSH i