Skip to content

Instantly share code, notes, and snippets.

View AlexJWayne's full-sized avatar

Alex Wayne AlexJWayne

View GitHub Profile
<?xml version="1.0" encoding="UTF-8"?>
<comments>
<comment preview="Bacon clock: http://www.mathlete.com/portfolio/wakeNbacon.php" author="Fred Garvin" date="Jul 31, 2008 12:37am CST" id="17559085">
<body>Bacon clock:
&lt;br /&gt;
&lt;br /&gt;&lt;a href="http://www.mathlete.com/portfolio/wakeNbacon.php" target="_blank"&gt;http://www.mathlete.com/portfolio/wakeNbacon.php&lt;/a&gt;</body>
<comments>
<comment preview="everything is better with bacon on it." author="boomstickah" date="Jul 31, 2008 12:38am CST" id="17559090">
<body>everything is better with bacon on it.</body>
<comments>
<comments story_id="17501593">
<comment author="username" date="timestampofsomesort" id="17499642">
<body>
Entire body of comment
</body>
<comments>
<comment author="username" date="timestampofsomesort" id="17499642">
<body>
Entire body of reply
</body>
// cameraPos and angle are instance vars, obviously
- (void)renderCamera {
GLfloat cameraHeightMax = 40.0;
GLfloat cameraHeightMin = 8.0;
if (cameraPos.z > cameraHeightMax) cameraPos.z = cameraHeightMax;
if (cameraPos.z < cameraHeightMin) cameraPos.z = cameraHeightMin;
// Setup camera
We can make this file beautiful and searchable if this error is corrected: No commas found in this CSV file in line 0.
EnemyName AverageCredits T1Weapons T2Weapons T3Weapons T4Weapons T5Weapons T1Equipment T2Equipment T3Equipment T4Equipment T5Equipment
Alcor 1144.5 0.27 0.48 0.09 0.0 0.0 0.21 0.39 0.09 0.0 0.0
Alcyone 1470.0 0.0 0.31 0.93 0.18 0.0 0.0 0.24 0.75 0.18 0.0
Aldebran 729.75 1.15 0.23 0.0 0.0 0.0 0.92 0.23 0.0 0.0 0.0
Algorab 918.75 0.2 0.42 0.16 0.02 0.0 0.16 0.34 0.14 0.02 0.0
Alioth 4105.5 0.0 0.3 0.74 0.41 0.71 0.0 0.24 0.595 0.36 0.65
Alnitak 1047.375 0.4 0.28 0.04 0.0 0.0 0.32 0.24 0.04 0.0 0.0
Altair 1737.75 0.0 0.0 0.15 0.28 0.05 0.0 0.0 0.12 0.23 0.05
Alula 364.875 0.45 0.09 0.0 0.0 0.0 0.36 0.09 0.0 0.0 0.0
Alya 1304.625 0.16 0.36 0.39 0.07 0.0 0.12 0.28 0.32 0.07 0.0
texture = [[Texture textureNamed:[data objectForKey:@"texture"]] retain];
pos.x = [[data valueForKeyPath:@"position.x"] floatValue];
pos.y = [[data valueForKeyPath:@"position.y"] floatValue];
size = [[data objectForKey:@"size"] floatValue];
angle = (GLfloat)(rand() % 360);
opacity = [[data objectForKey:@"opacity"] floatValue];
drag = [[data objectForKey:@"drag"] floatValue];
if (nebula.armorRegen > 0 || nebula.shieldRegen > 0) {
// positive nebula
currentShields += nebula.shieldRegen;
currentArmor += nebula.armorRegen;
if (currentArmor > maxArmor && currentArmor > 0.0) currentArmor = maxArmor;
if (currentShields > maxShields) currentShields = maxShields;
} else {
// negative nebula
[self damageShields:-nebula.shieldRegen armor:-nebula.armorRegen];
image = Magick::Image.new(width, height) do
self.colorspace = Magick::RGBColorspace
self.depth = 8
self.density = '72'
self.format = 'PNG'
self.background_color = 'none'
end
image.color_reset!(Magick::Pixel(0, 255, 0, 128))
text = Magick::Draw.new
text.pointsize = options[:font_size].to_i
text.font = "#{RAILS_ROOT}/public/fonts/Tahoma.Bold.ttf"
my_image.annotate(text, 0, 0, offset_x, offset_y, string_to_write)
<head>
<link rel="SHORTCUT ICON" href="/static/images/icon/favicon.ico" />
</head>
def uncool
facet = Facet.find_or_initialize_by_uri(@subject.uri)
facet.holo_field = @holo_field
facet.save
facet = Facet.find_by_uri(@subject.uri)
end
def way_cool
facet = @holofield.facets.find_or_create_by_uri(@subject.uri)
end