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
#!/usr/bin/perl | |
# read from object file, output all variable names and types. | |
# object needs to be compiled with -g CFLAG | |
if($ARGV[0] eq '') { | |
print "need to specify an objectfile\n"; | |
} | |
else { | |
$objfile = $ARGV[0]; |
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
#!/usr/bin/perl | |
# run with; | |
# perl perlObf.pl inputFile.pl > outpuFile.pl | |
use Digest::MD5 qw(md5_hex); | |
while( <> ) { | |
while(/([\$\%\@]#?)([A-Za-z]\w+)/gm) { | |
if($2 ne 'ARGV') { |
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
javascript:(function(){ | |
var TEMP = -1; | |
var HTML = ''; | |
while(mine = TralbumData.trackinfo[++TEMP]) { | |
HTML += '<a href="' + mine.file + '" target="_blank">' + mine.title + '</a><br/>' + "\n"; | |
} | |
var newdiv = document.createElement('div'); | |
newdiv.setAttribute('id', 'helloWorld'); | |
newdiv.style.background = "#000"; | |
newdiv.innerHTML = HTML; |
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
#include <stdio.h> | |
#define ONE 5 | |
#define TWO 2 | |
#define THREE 3 | |
typedef struct { | |
unsigned int temp; | |
} rah; |
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 | |
/* test regex */ | |
$input[] = 'admin/'; | |
$input[] = 'mens-books'; | |
$input[] = 'admin/foo'; | |
$input[] = 'foo/bar'; | |
$input[] = 'min'; | |
$input[] = 'admin'; |
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
#include <iostream> | |
#include <stdlib.h> | |
using namespace::std; | |
class testClass { | |
public: | |
string myString1; | |
char *myString2; | |
unsigned myInt; | |
testClass(); |
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
int unsignedRightShift(int input, char shift) { | |
if(shift == 0) { | |
return input; | |
} | |
return (((input >> 1) & 0x7fffffff) >> (shift - 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
/* | |
This is a stripped down piece of code from a code generator. | |
It works in GCC but with another compiler I'm using is fails, its a real corner case though. | |
If there was only one struct (structure) then it wouldn't be a problem, when there is more than one it messes up. | |
The fact that the static structures foo and bar are defined and then redefined causes a problem in the assembly output. GCC doesn't seem to mind this and the function pointer is correct. The VEX assembly will output 2 memory areas with the same tag, one empty and one with the correct data. | |
Question: what should be the proper behaviour of this? The code is technically redefining the structures, but GCC gives no compiler warnings? Are structs different for defining? | |
Or would you say this is bad coding? | |
*/ | |
typedef struct structure { |
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
<html> | |
<head> | |
<script src="jquery.min.js"></script> | |
<script> | |
var rah; | |
var output = []; | |
/* i would assume that output would be the same as input | |
but the outcome is the a->a2->a3->a4 rather than a->a2, a->a3, a->a4 | |
*/ |
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
#include <stdio.h> | |
#include <stdlib.h> | |
typedef struct elementT { | |
unsigned value; | |
struct elementT *next; | |
} elementT; | |
elementT *removeElement(elementT *, unsigned); | |
elementT *addElement(elementT *, unsigned); |