Skip to content

Instantly share code, notes, and snippets.

View Afforess's full-sized avatar

Cameron McAvoy Afforess

View GitHub Profile
@Afforess
Afforess / build.sh
Last active August 29, 2015 14:09
assembly-deploy.sh
#!/bin/bash
WORKING_DIR="/home/afforess/workspace/NationStatesPlusPlus/Assembly"
BUILD_DIR="/home/afforess/workspace/Assembly-dist"
GIT_USER="Afforess"
GIT_EMAIL="afforess@gmail.com"
echo "WORKING_DIR: $WORKING_DIR"
echo "BUILD_DIR: $BUILD_DIR"
sleep 3
<?xml version="1.0"?>
<r:RDF xmlns:r="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns="http://www.mozilla.org/2004/em-rdf#">
<r:Description about="urn:mozilla:extension:afforess@gmail.com">
<updates>
<r:Seq>
<r:li>
<r:Description>
<version>2.4.3.6</version>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int select_ai_difficulty();
char* rand_dictionary_word();
char* select_dict_word(char* command, int num);
int count_dict(char* word, int exact);
void error_exit(char* msg);
char* generate_scrambled_word(int difficulty, char** original_word);
#!/bin/bash
repo="https://github.com/FeepingCreature/fcc.git"
tools="http://svn.dsource.org/projects/scrapple/trunk/tools/tools/"
#install git, svn, libc
sudo apt-get install git subversion libc6-dev -y
#disable multiarch, 64bit only
sudo ln -s /usr/lib/x86_64-linux-gnu /usr/lib64
#!/bin/bash
repo="https://github.com/FeepingCreature/fcc.git"
tools="http://svn.dsource.org/projects/scrapple/trunk/tools/tools/"
#install git, svn, libc
sudo apt-get install git subversion libc6-dev-i386 -y
#disable multiarch, 64bit only
sudo ln -s /usr/lib/x86_64-linux-gnu /usr/lib64
function find_all_entity(entity_name)
local surface = game.surfaces['nauvis']
local entities = {}
for chunk in surface.get_chunks() do
local chunk_area = {lefttop = {x = chunk.x*32, y = chunk.y*32}, rightbottom = {x = chunk.x*32+32, y = chunk.y*32+32}}
local chunk_entities = surface.find_entities_filtered({area = chunk_area, name = entity_name})
for i = 1, #chunk_entities do
entities[#entities + 1] = chunk_entities[i]
end
end
EvoGUI = {}
function EvoGUI.new()
function EvoGUI:createEvolutionRateText()
local diff = game.evolution_factor - global.exponential_moving_average
-- percentage is decimal * 100, * 60 for per minute value
local evo_rate_per_min = math.abs(diff * 100 * 60)
--- Data module
-- @module Data
require 'stdlib/core'
Data = {}
--- Selects all data values where the key matches the selector pattern.
-- The selector pattern is divided into groups. The pattern should have a colon character `:` to denote the selection for each group.
-- <br/>The first group is for the class of the data type (item, recipe, entity-type, etc)