Skip to content

Instantly share code, notes, and snippets.

@Equinox-
Equinox- / README
Last active April 4, 2024 10:03
Very simple DDS plugin for GIMP that uses texconv to convert things behind the scenes to encode/decode BC7
1. Download the `file-dds-texconv.py` file. Edit BINARY to be the path to your texconv binary (located in the SE ModSDK, or elsewhere)
2. Copy the script into the GIMP plugins directory. For instance, `C:\Program Files\GIMP 2\lib\gimp\2.0\plug-ins`
<?xml version="1.0" encoding="utf-16"?>
<MyObjectBuilder_SessionManager xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<CustomLogger>
<LogLevel>Debug</LogLevel>
<Filename>ProceduralWorld.log</Filename>
</CustomLogger>
<CommandDispatch />
<Network />
<RPC />
<ProceduralWorldManager />
@Equinox-
Equinox- / v8.1-snipe.js
Last active February 22, 2016 03:52
Fluffy88's Snipe Calculator (dalesmckay modification) (Equinox- ms modification)
/*
Author : Fluffy88
Website : http://fluffy88.com
Rewritten by : dalesmckay
TODO: save settings in a cookie
*/
function fnInjectOverviewBar(){
/* Default to your own currently active village */
/* all fiddely bits */
if(!this.nameTemplate) nameTemplate = '{unit} {launched2} {coords} {player} {duration} {distance} {backtime} {attack_id}';
if(!this.tableTemplate) tableTemplate = '<tr><td rowspan="11">Additional Information</td><td>Unit:</td><td>{unit}</td></tr><tr><td>Launched (AttackID)</td><td>{launched1}</td></tr><tr><td>Launched (Corrected)</td><td>{launched2}</td></tr><tr><td>Coords</td><td>{coords}</td></tr><tr><td>Player</td><td>{player}</td></tr><tr><td>Duration</td><td>{duration}</td></tr><tr><td>Distance</td><td>{distance}</td></tr><tr><td>Return (Backtime)</td><td>{backtime}</td></tr><tr><td>attackId</td><td>{attack_id}</td></tr><tr><td>Change Name</td><td>{namechange}</td></tr><tr><td>Forum Post</td><td><input id="forumpost" value="{forumpost}" size="40"/></td></tr>';
if(!this.forumTemplate) forumTemplate = '[table][**]Attack On[||][img]http://en57.tribalwars.net/graphic/command/support.png[/img][player]{targetplayer}[/player][||]Origin[||][img]http://en57.tribalwars.net/graphic/command/at
@Equinox-
Equinox- / christmas-lights-main.c
Last active January 1, 2016 08:29
Christmas Lights Controller + Music Player
#define F_CPU 1000000UL /* Clock Frequency = 1Mhz */
#include <avr/io.h>
#include <util/delay.h>
//Notes
#define C1 (32)
#define Cs1 (34)
#define D1 (36)
#define Ds1 (39)
@Equinox-
Equinox- / extra-spicy-gingersnaps.md
Last active December 31, 2015 17:09
Extra-Spicy Gingersnaps

Extra-Spicy Gingersnaps

Prep and cook time: About 40 minutes plus 20 minutes to chill dough.

Notes: Store airtight at room temperature for up to 3 days or freeze for longer storage.

Makes: 5 dozen cookies

Materials:

@Equinox-
Equinox- / Simulation.cpp
Created December 10, 2013 06:34
C++ implementation of NBody simulation, example code.
float mult, dist, dX, dY, dZ;
Body *b;
Body *n;
Vector3f closing;
for (std::size_t i = 0; i < bodies->size(); i++) {
b = bodies->at(i);
closing.x = closing.y = closing.z = 0; // Reset force computation
for (std::size_t j = 0; j < bodies->size(); j++) {
n = bodies->at(j);
@Equinox-
Equinox- / Simulation.java
Created December 10, 2013 06:24
Java implementation of an N-Body simulation; main loop code.
// Lets go
for (int i = 0; i < bodies.size(); i++) {
Body b = bodies.get(i);
for (int w = i + 1; w < bodies.size(); w++) {
Body with = bodies.get(w);
double dist2 = // The distance between the two bodies
with.getPosition().dist(
b.getPosition());
double mag = // The force between the two bodies
Constants.GRAVITATIONAL_CONSTANT
@Equinox-
Equinox- / KittensBookmarklet.js
Last active December 30, 2015 05:29
Floating kittens bookmarklet.
javascript:(function(){if ((typeof spawnKitten) === "function") {spawnKitten();} else {var element = document.createElement("script");element.type = "text/javascript";element.src = "https://gist.github.com/Equinox-/7783216/raw/TheScript.js";document.head.appendChild(element);}})();
@Equinox-
Equinox- / gist:5127682
Created March 10, 2013 08:48
Basic structure of a time based termination command.
class CommandThing ... {
private:
long startTime;
//classy stuff
}
void CommandThing::Initialize() {
startTime = GetFPGATime(); // Get a reference point
}