Skip to content

Instantly share code, notes, and snippets.

#!/bin/sh
##### HELPERS #####
function update_git() # dir url branch
{
dir=$1
url=$2
branch=$3
if [ -d $dir ]; then
@02JanDal
02JanDal / CMakeLists.txt
Created April 21, 2015 06:33
CMakeLists.txt for Qt translations
set_directory_properties(PROPERTIES CLEAN_NO_CUSTOM 1)
### translation stuff
file(GLOB TRANSLATION_FILES ${CMAKE_CURRENT_LIST_DIR}/*.ts)
qt5_create_translation(TRANSLATION_MESSAGES ${FILES_TO_TRANSLATE} ${TRANSLATION_FILES})
qt5_add_translation(TRANSLATION_QM ${TRANSLATION_FILES})
add_custom_target(translations_update DEPENDS ${TRANSLATION_MESSAGES})
add_custom_target(translations DEPENDS ${TRANSLATION_QM})
{
"formatVersion": 0,
"uid": "net.minecraftforge",
"version": "4.0.0.183",
"time": 1344922397,
"requires": [
{
"uid": "net.minecraft",
"version": "1.3.2"
}
{
"formatVersion": 0,
"uid": "net.minecraftforge",
"version": "1.3.2.01",
"time": 1328269373,
"requires": [
{
"uid": "net.minecraft",
"version": "1.1"
}
{
"formatVersion": 0,
"uid": "net.minecraftforge",
"version": "1.3.2.01",
"time": 1328269373,
"requires": [
{
"uid": "net.minecraft",
"version": "1.1"
}
{
"formatVersion": 0,
"uid": "net.minecraftforge",
"version": "4.0.0.192",
"time": 1345030349,
"requires": [
{
"uid": "net.minecraft",
"version": "1.3.2"
}
#!/usr/bin/env groovy
import groovy.json.internal.JsonFastParser
import groovy.transform.CompileStatic
import groovy.transform.Field
@Field
JsonFastParser jsonParser = new JsonFastParser(false, false, false, false)
@Field
char[] data = new File("json.json").text.toCharArray()
for (int i = 1; i < argc; ++i)
{
const std::string arg = argv[i];
if (expectedArgument && arg[0] != '-')
{
items.back().hasArgument = true;
}
else
{
if (arg[0] == '-' && !noMoreOptions)
@02JanDal
02JanDal / Project Argonauts - Format.md
Last active August 29, 2015 14:26
Project Argonauts - Format

Project Argonauts - Format

This file contains thoughts, ideas and hopefully a format for Project Argonauts.

  • It should wrap around existing data as much as possible

Contents

  • Strictly declarative; nothing that "runs"
  • Type system with simple templates

How should versions be referenced internally?

Currently we have 2 attributes for version identification: name and timestamp. The name is used for cosmetic purposes; displaying in the UI etc., while the timestamp is used for ordering.

Now, the question is: how should versions be referenced internally? The available options are:

  • Using the name
  • Using the timestamp
  • Using a new attribute; ID