Skip to content

Instantly share code, notes, and snippets.

Patch Notes:
Version 0.5.245
————-
Jan 11
More UI Memory Optimizations
- Added another Dampeer Alt
- Added Russian Blacksmith
@blam23
blam23 / beepboop.cs
Created March 12, 2012 18:20
Get portion of image stored in 1d
for(int y = portion.y; y < portion.height+portion.y; y++)
{
for(int x = portion.x; x < portion.width+portion.x; x++)
{
int pixelPos = (x*image.width) + y;
image.pixelData[pixelPos] = Color.Black;
}
}
@blam23
blam23 / Blur.as
Created August 17, 2012 23:07
Basic Blur BitmapData
var bmp:Bitmap;
var bmpdata:BitmapData;
var srect = new Rectangle(0, 0, stage.stageWidth, stage.stageHeight);
var blurF:BlurFilter = new BlurFilter(3, 3, BitmapFilterQuality.LOW);
var colorT:ColorTransform = new ColorTransform(1.0, 1.0, 1.0, 0.9);
bmpdata = new BitmapData(0, 0, srect.width, srect.height);
bmp = new Bitmap(bmpdata);
addEventListener(Event.ENTER_FRAME, onFrame);
@blam23
blam23 / scraper.txt
Created August 26, 2012 18:34
AxRun File Scraper Format
Applications
# Get all the startup items!
path = ["%appdata%\Microsoft\Windows\Start Menu", "%SystemDrive%\ProgramData\Microsoft\Windows\Start Menu"]
ext = ["lnk", "exe"]
filter = ["uninstall", "welcome", "help", "start here", "readme", "read me", "release notes"]
recurse = true
@blam23
blam23 / AxIni.cs
Created August 26, 2012 18:43
TryGet Stuff
public bool TryGetValue<T>(string k, out T value)
{
object v;
var d = Data.TryGetValue(k, out v);
if (d)
{
if (v is object[])
{
throw new Exception("TryGetValue does not support arrays, use TryGetArray instead.");
}
@blam23
blam23 / AxConfig.cs
Created August 26, 2012 18:58
AxConfig Parser
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
namespace AxRun
{
public class AxConfigEntry
{
public string Name;
List<String> groups = new ArrayList<String>();
groups.add(strLine);
@blam23
blam23 / REPL.ax3
Created September 15, 2012 23:38
axScript3 REPL
//REPL Script 1.1
#module <Ax/STD.dll> // Needed for console output
#module <Ax/Exit.dll> // Needed for exit hook
// Exit Handler function.
// Whenever the script is stopped this function is called.
// It can be used to catch errors and continue the script.
~(exit: type error |
(
@blam23
blam23 / tbbot-irc.rb
Last active December 18, 2015 14:59 — forked from Eleeleth/tbbot-irc.rb
#!/usr/bin/env ruby
## Bot, sits in TB server and pings periodically to
## remain connected. Parses SAY strings for globals
require 'socket'
require 'digest/md5'
require 'io/wait'
def resolver(server)
puts "Trying to resolve #{server} to IP..."
@blam23
blam23 / graph.lua
Last active May 1, 2017 14:52
Graphs in Toribash using Lua.
--dofile("dbg.lua")
-- start of graph class
graph = {
LINE = 0, BAR = 1,
Colors = { {1,0,0,0.4}, {0,0,1,0.7}, {0,1,1,0.7}, {1, 0, 1,0.7}, {1, 1, 0, 0.7}, {0, 0.7, 0, 0.7}, {1, 0.5, 0, 0.7}}
}
graph.__index = graph
function graph.new(gtype, x, y, width, height, max)