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 | |
error_reporting(E_ALL); | |
ini_set("display_errors", 1); | |
require_once('../php/Commun/FUS_SCM_ini.php'); | |
require_once('../php/Commun/FUS_SCM_database.php'); | |
$o_db = db_connect($_db_host, $_db_user, $_db_passw); | |
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
import os | |
alist = ["wtf", "i", "love", "this", "font"] | |
for lol in alist: | |
print lol |
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 | |
error_reporting(E_ALL); | |
ini_set("display_errors", 1); | |
require_once('../php/Commun/FUS_SCM_ini.php'); | |
require_once('../php/Commun/FUS_SCM_database.php'); | |
$o_db = db_connect($_db_host, $_db_user, $_db_passw); |
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
/* | |
Schema | |
CREATE TABLE dinosaurs ( | |
"name" TEXT, | |
"flying" BOOL, | |
"extinct" BOOL | |
); | |
*/ |
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 | |
// Get uncompressed size of file | |
$fp = fopen($filename, 'rb'); | |
fseek($fp, -4, SEEK_END); | |
$buf = fread($fp, 4); | |
$size = end(unpack('V', $buf)); | |
fclose($fp); | |
// Get uncompressed contents of file |
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 | |
// NOTE: you can use actionscript's String.fromCharCode() in place of php's chr() | |
// NOTE: you can use actionscript's parseInt() in place of php's hexdec() | |
$md5 = md5("hello"); // php's md5() returns a string | |
$n = 123456789; | |
var_dump(pack("H*", $md5) === packMD5($md5)); // output: true | |
var_dump(pack("VXxx", $n) === packVXxx($n)); // output: true |
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
""" | |
AIR builder v%(VERSION)s | |
Synopsis: build.py [options] | |
-b Build the final .air file (will prompt for password) | |
-d Launch the application in the debugger | |
-s Create a new Self-Signed security certificate | |
-h This help message | |
""" |
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
<rss version="2.0" xmlns:media="http://search.yahoo.com/mrss/"> | |
<channel> | |
<title>Picture's of your amazing son!!!</title> | |
<link>http://pifantastic.com</link> | |
<description>Basically pictures of Aaron doing amazing shit.</description> | |
<item> | |
<title>Title</title> | |
<link>Link</link> | |
<media:content url="http://path.to.my/photo.jpg" /> | |
</item> |
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 | |
for ($x = 0; $x < strlen($string); $x += 2) | |
{ | |
print(hexdec($string[$x] . $string[$x + 1]) . " "); | |
$binary_string .= chr(hexdec($string[$x] . $string[$x + 1])); | |
} |
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
function packVXxx(n:int):String { | |
var binaryString:String = new String; | |
binaryString += String.fromCharCode(n & 0x000000ff); | |
binaryString += String.fromCharCode((n >> 8) & 0x000000ff); | |
binaryString .= String.fromCharCode((n >> 16) & 0x000000ff); | |
return binaryString += String.fromCharCode(0) + String.fromCharCode(0); | |
} |