This file contains hidden or 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 | |
| function find_urls_url_callback($matches) { | |
| if(strpos($matches[0], '<') !== false) { | |
| return $matches[0]; | |
| } | |
| if(strpos($matches[0], '://') === false) { | |
| return "<a class=\"url\" href=\"http://$matches[0]\">$matches[0]</a>"; | |
| } | |
| return "<a class=\"url\" href=\"$matches[0]\">$matches[0]</a>"; |
This file contains hidden or 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
| var pre_forecast=0;window.setInterval(function(){var now=new Date();var h=now.getHours();var m=now.getMinutes();while(String(h).length<2){h='0'+h;}while(String(m).length<2){m='0'+m;}var forecast=Math.round(parseFloat($(".totalcontributed").text().replace(",",""))/(60-(new Date(timing.end*1000)-now)/1000/60/60)*60*100)/100;console.info(h+':'+m,forecast,((forecast-pre_forecast>0)?'+':'')+Math.round(forecast-pre_forecast));pre_forecast=forecast;},1000*60); |
This file contains hidden or 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
| var alpha:Number = 0.5; | |
| var bitmap1:BitmapData = new BitmapData(100, 100, true, 0xffff0000); | |
| var bitmap2:BitmapData = new BitmapData(100, 100, true, 0xff0000bb); | |
| // draw with transparency | |
| var transform:ColorTransform = new ColorTransform(1, 1, 1, alpha); | |
| bitmap1.draw(bitmap2, null, transform); |
This file contains hidden or 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
| /* | |
| import flash.display.*; | |
| import flash.utils.*; | |
| import mx.graphics.codec.*; | |
| */ | |
| var bitmap:BitmapData = new BitmapData(128, 128, true); | |
| var x:int, y:int; | |
| for (y = 0; y < bitmap.height; y++) { | |
| for (x = 0; x < bitmap.width; x++) { |
This file contains hidden or 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
| #version 3.6; | |
| // menger sponge | |
| // -W1024 -H1024 +A0.6 +UF +FN +THFS +GAmenger.txt | |
| global_settings { | |
| // ambient_light rgb <1, 1, 1> | |
| radiosity { | |
| pretrace_start 0.1 | |
| pretrace_end 0.005 |
This file contains hidden or 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
| import os, glob, string | |
| import datetime, calendar | |
| import json, rfc822, plistlib | |
| root = './backup/' | |
| tweet_count = 0 | |
| print 'conversion started' | |
| if not os.path.exists('./entries/'): |
This file contains hidden or 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
| {"processors":[{"y":480,"id":"4d7706a007860f4aabc86685e91f56d7","options":{"input":"aäbcdefghijklmnoöpqrsßtuüvwxyz"},"type":"Source","x":208},{"y":368,"id":"1503935d73f85a17b55da556626a15b7","options":{"input":"Dieser Text wird total durcheinandergeworfen!"},"type":"Source","x":16},{"y":80,"id":"81c0fbf20213020b8b91e03607f59fa7","options":{"offset":0},"type":"Marquee","x":256},{"y":192,"id":"0fdd6091690ca3d109cdeee4d8c75355","options":{"offset":-1},"type":"Marquee","x":256},{"y":304,"id":"26ab208bc007b239652f085e5cfde4a6","options":{"offset":-2},"type":"Marquee","x":256},{"y":80,"id":"0c4bca0abea80f1ed9ae049de1e1065c","options":{"zipper":false,"take1":1,"take2":2},"type":"Join","x":416},{"y":416,"id":"2c53f8d1dda2ef472333967793bc1115","options":{},"type":"Void","x":368},{"y":400,"id":"15c75dc90fb1c93db4e259b907685ad0","options":{"output":"Cgbrcö Sbws vgöc rnsXk ätpagcfmYkccöfcunpcdl!"},"type":"Trace","x":1104},{"y":192,"id":"29e50fb0f0970c5f40e4469911068027","options":{"zipper":false,"take1":1,"take2":2},"typ |
This file contains hidden or 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
| {"connections":[{"receiver":["4877e76f5745c2fb899935e6b4799185",0],"sender":["4d7706a007860f4aabc86685e91f56d7",0]},{"receiver":["44e6e3728b9c3bb94aba6c0cf1db72cd",0],"sender":["4d7706a007860f4aabc86685e91f56d7",0]},{"receiver":["11b7b250c84dc393b6045c1dcfde322f",0],"sender":["44e6e3728b9c3bb94aba6c0cf1db72cd",0]},{"receiver":["47b09c78669d2cb8864c7653a1e1fa70",0],"sender":["44e6e3728b9c3bb94aba6c0cf1db72cd",0]},{"receiver":["7a1384edfa52e20a2136c1c185730e9f",0],"sender":["44e6e3728b9c3bb94aba6c0cf1db72cd",0]},{"receiver":["c0f5b7f255ffa317b00f82dccca89c56",0],"sender":["7a1384edfa52e20a2136c1c185730e9f",0]},{"receiver":["6a1dac49802a889cd2ec9557fc40a495",0],"sender":["59a38f1114920eac2f79cbcff861f4b4",0]},{"receiver":["c0f5b7f255ffa317b00f82dccca89c56",1],"sender":["6a1dac49802a889cd2ec9557fc40a495",0]},{"receiver":["2121471002467768d40a411599b3ea23",0],"sender":["c0f5b7f255ffa317b00f82dccca89c56",0]},{"receiver":["adcab899943073cad63d28c00fd0b9c1",0],"sender":["6d1b0bdae377ddbfe525aadffecdd5d4",0]},{"receiv |
This file contains hidden or 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
| // http://de.wikipedia.org/wiki/American_Standard_Code_for_Information_Interchange#ASCII-Tabelle | |
| for(var t=0; t<140; t++) { | |
| var string = ''; | |
| for(var i=0; i<140; i++) { | |
| string += String.fromCharCode(33+Math.floor(Math.random()*94)); | |
| } | |
| console.log(string); | |
| } |
This file contains hidden or 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
| # this script will currently EAT YOU(r cpu forever)! | |
| import json | |
| import bpy | |
| # materials | |
| grass = bpy.data.materials.new('test_mat') | |
| # TODO: more materials, textures! | |
| grass.diffuse_color = (0,1,0) | |
| grass.use_shadeless = False |