Discover gists
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
# watch me turn java into ruby | |
def try; end | |
def catch(*args) end | |
def RuntimeException(*args) end | |
def re; end | |
class Anything; def method_missing(*args) Anything.new end end | |
def getDialog; Anything.new end | |
def WebResponse(*args) end | |
def atUrl; '' end |
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
<?php | |
// This is a PLUGIN TEMPLATE. | |
// Copy this file to a new name like abc_myplugin.php. Edit the code, then | |
// run this file at the command line to produce a plugin for distribution: | |
// $ php abc_myplugin.php > abc_myplugin-0.1.txt | |
// Plugin name is optional. If unset, it will be extracted from the current | |
// file name. Uncomment and edit this line to override: |
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
class GraphsController < ApplicationController | |
def top | |
@graph = open_flash_chart_object(1200, 500, '/graphs/bar_chart') | |
end | |
def bar_chart | |
top = Customer.find(:all, :select => 'sum(CMS.ORD_TOTAL) AS total, CUST.COMPANY', :group => 'CMS.CUSTNUM, CUST.COMPANY', :joins => [:orders], :limit => 10, :order => 'total DESC') | |
bar = BarOutline.new(50, '#9933CC', '#8010A0') |
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
<? | |
//$im = ImageCreate(250,45); // Blank Background | |
$im = ImageCreateFromPng("images/image_prev_bg.png"); // PNG Image Background | |
$white = ImageColorAllocate($im,255,255,255); | |
$black = ImageColorAllocate($im,0,0,0); | |
$blue = ImageColorAllocate($im,0xF2,0xFF,0xFF); | |
ImageTTFText($im, $textsize, 0, 10, 30, $black, "arial.ttf", $text); |
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
Now = calendar:datetime_to_gregorian_seconds(erlang:universaltime()) - 14400, | |
DelFun = fun(File, {ok, [{{time, Time}, _}]}) when Time < Now -> file:delete(File); (_, _) -> ok end, | |
[DelFun(File, file:consult(File)) || File <- filelib:wildcard("cache/*")]. |
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
<h1>Hi Markus</h1> | |
<p>playing around with gist | |
<ul> | |
<li>how does this works ? | |
<li>une more line | |
</ul> |
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
Multiple integer overflows in the rb_str_buf_append function in | |
Ruby 1.8.4 and earlier, 1.8.5 before 1.8.5-p231, 1.8.6 before | |
1.8.6-p230, 1.8.7 before 1.8.7-p22, and 1.9.0 before 1.9.0-2 | |
allow context-dependent attackers to execute arbitrary code or | |
cause a denial of service via unknown vectors that trigger memory | |
corruption. (CVE-2008-2662) | |
Multiple integer overflows in the rb_ary_store function in Ruby | |
1.8.4 and earlier, 1.8.5 before 1.8.5-p231, 1.8.6 before 1.8.6-p230, | |
and 1.8.7 before 1.8.7-p22 allow context-dependent attackers to |
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
<?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: | |
<br /> | |
<br /><a href="http://www.mathlete.com/portfolio/wakeNbacon.php" target="_blank">http://www.mathlete.com/portfolio/wakeNbacon.php</a></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> |
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
<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> |
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
merrily around the mistletoe | |
Merrily we go.. Around and around we are spinning, faster and faster as the years go by |