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 xcurl($url,$ref=null,$post=array(),$ua="Mozilla/5.0 (X11; Linux x86_64; rv:2.2a1pre) Gecko/20110324 Firefox/4.2a1pre",$print=false) { | |
$ch = curl_init(); | |
curl_setopt($ch, CURLOPT_AUTOREFERER, true); | |
if(!empty($ref)) { | |
curl_setopt($ch, CURLOPT_REFERER, $ref); | |
} | |
curl_setopt($ch, CURLOPT_URL, $url); | |
curl_setopt($ch, CURLOPT_HEADER, 0); | |
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1); |
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 cleanInput($input) { | |
$search = array( | |
'@<script[^>]*?>.*?</script>@si', // Strip out javascript | |
'@<[\/\!]*?[^<>]*?>@si', // Strip out HTML tags | |
'@<style[^>]*?>.*?</style>@siU', // Strip style tags properly | |
'@<![\s\S]*?--[ \t\n\r]*>@' // Strip multi-line comments | |
); | |
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 force_download($filename = '', $data = false, $enable_partial = true, $speedlimit = 0) | |
{ | |
if ($filename == '') | |
{ | |
return FALSE; | |
} | |
if($data === false && !file_exists($filename)) | |
return FALSE; |
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
image.height = stage.stageHeight; | |
image.width = stage.stageWidth; | |
image.scaleX = image.scaleY = Math.max( image.scaleX, image.scaleY ); |
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 ExternalInterface class use this instead of trace() to view output in JavaScript console | |
public function log(_t:String):void{ | |
if(ExternalInterface.available){ | |
ExternalInterface.call("console.log", _t ); | |
} | |
} |
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
/* | |
* main.fla -> main.as | |
*/ | |
package | |
{ | |
import flash.display.MovieClip; | |
import flash.events.Event; | |
/** | |
* ... |
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
//Embedding the font: | |
[Embed(source="FONT.ttf", fontName = "myFont", mimeType = "application/x-font-truetype", advancedAntiAliasing="true", embedAsCFF="false")] | |
private var myEmbeddedFont:Class; | |
//Creating the textformat: | |
var defaultTextFormat : TextFormat = new TextFormat('myFont'); | |
//Applying the font to a textfield: | |
myTextField.defaultTextFormat = Config.defaultTextFormat; | |
myTextField.embedFonts = true; |
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
package tr.com.gotoandrock.utils | |
{ | |
import com.greensock.TweenLite; | |
import flash.display.DisplayObject; | |
import flash.geom.Matrix; | |
/** | |
* Helps 3d tranformation applied target back to normal 2D Matrix and look&feel :) | |
* Should only use tween ends with if z value equal 0; |
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
//AssetManager.as | |
// usage: AssetManager.getInstance.getAssetByName("MonaLisa"); | |
package | |
{ | |
import flash.utils.describeType; | |
import flash.utils.getDefinitionByName; | |
public class AssetManager | |
{ |
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 tf:TextField = new TextField(); | |
tf.autoSize = TextFieldAutoSize.LEFT; | |
tf.border = true; | |
addChild(tf); | |
tf.x = 200; | |
tf.y = 200; | |
tf.multiline = true; | |
tf.height = 200; | |
tf.appendText("params:" + "\n"); |