Skip to content

Instantly share code, notes, and snippets.

@Equinox-
Equinox- / README
Last active Oct 29, 2021
Very simple DDS plugin for GIMP that uses texconv to convert things behind the scenes to encode/decode BC7
View README
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`
View session.xml
<?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 Feb 22, 2016
Fluffy88's Snipe Calculator (dalesmckay modification) (Equinox- ms modification)
View v8.1-snipe.js
/*
Author : Fluffy88
Website : http://fluffy88.com
Rewritten by : dalesmckay
TODO: save settings in a cookie
*/
function fnInjectOverviewBar(){
/* Default to your own currently active village */
View attackIdLookupAndRenaming.js
/* 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 Jan 1, 2016
Christmas Lights Controller + Music Player
View christmas-lights-main.c
#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 Dec 31, 2015
Extra-Spicy Gingersnaps
View extra-spicy-gingersnaps.md

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 Dec 10, 2013
C++ implementation of NBody simulation, example code.
View Simulation.cpp
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 Dec 10, 2013
Java implementation of an N-Body simulation; main loop code.
View Simulation.java
// 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 Dec 30, 2015
Floating kittens bookmarklet.
View KittensBookmarklet.js
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 Mar 10, 2013
Basic structure of a time based termination command.
View gist:5127682
class CommandThing ... {
private:
long startTime;
//classy stuff
}
void CommandThing::Initialize() {
startTime = GetFPGATime(); // Get a reference point
}