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
/** | |
* To use: | |
* ``` | |
* ftbJsonToXaeros('paste your waypoints.json contents here'); | |
* ``` | |
* then append to your Xaero's waypoints file(s), located in | |
* `xaero/minimap/<server name>/<dimension>/mw$default_1.txt` | |
*/ | |
const MINECRAFT_COLORS = [ |
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
SECONDS = 1e3; | |
MINUTES = 60 * SECONDS; | |
HOURS = 60 * MINUTES; | |
VERBOSE_AUTO = true; | |
autocraftNames = ['steel', 'plate']; | |
mediumCraftNames = ['kerosene', 'thorium', 'eludium']; | |
slowCraftNames = ['beam', 'slab', 'parchment', 'manuscript']; | |
scienceCraftNames = ['parchment', 'manuscript', 'compendium']; | |
religionBuyNames = ['Black Pyramid', 'Black Nexus', 'Black Core']; |
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
Date.prototype.isLeapYear = function() { | |
var year = this.getFullYear(); | |
if((year & 3) != 0) return false; | |
return ((year % 100) != 0 || (year % 400) == 0); | |
}; | |
// Get Day of Year | |
Date.prototype.getDOY = function() { | |
var dayCount = [0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334]; |
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
index2 = (completion->direction < 0) ? index - 1 : index + 1; | |
while ((index2 >= 0) && (index2 < completion->list->size)) | |
{ | |
ptr_completion_word2 = | |
(struct t_gui_completion_word *)(completion->list->data[index2]); | |
if ((ptr_completion_word->nick_completion | |
&& (gui_completion_nickncmp (completion->base_word, | |
ptr_completion_word2->word, | |
length) == 0)) | |
|| (!ptr_completion_word->nick_completion |
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
if (pos_start <= pos_end) | |
{ | |
completion->position_replace = pos_start; | |
completion->base_word = malloc (pos_end - pos_start + 2); | |
for (i = pos_start; i <= pos_end; i++) | |
{ | |
completion->base_word[i - pos_start] = data[i]; | |
} | |
completion->base_word[pos_end - pos_start + 1] = '\0'; | |
} |
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
import java.awt.event.*; | |
import java.awt.image.*; | |
import java.text.NumberFormat; | |
import java.awt.*; | |
import java.io.*; | |
import java.util.*; | |
import java.nio.*; | |
import javax.media.opengl.*; | |
import javax.media.opengl.glu.*; | |
import javax.swing.*; |
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
// For some reason select2 interferes with the space key for multiple | |
// selects. It doesn't in its own examples, but it does here. This is a | |
// workaround to manually add a space to the input. It uses JQuery event | |
// delegation because the actual element that the event is triggered on | |
// doesn't exist at the time this gets set up. | |
element.parent().on('keypress', '.select2-selection', awfulSpaceHack); | |
element.on('$destroy', function () { | |
element.parent().off('keypress', '.select2-selection', awfulSpaceHack); | |
}); | |
function awfulSpaceHack(evt) { |
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
7ae0ae7 HEAD@{0}: checkout: moving from d3db4a7d4eb3394286e0ca815edc5c66d5b45120 to master | |
d3db4a7 HEAD@{1}: commit: Another boop | |
3ff7027 HEAD@{2}: checkout: moving from master to 3ff7027 | |
7ae0ae7 HEAD@{3}: commit: Boop | |
3ff7027 HEAD@{4}: clone: from https://github.com/xiagu/2015-advent-of-code.git |
NewerOlder