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
## foo.asm | |
.text | |
.globl main | |
main: | |
## Load *theFloat into $f0 ... | |
l.s $f0, theFloat | |
nop |
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 forEach(array, f) { | |
for (i = 0; i < array.length; ++i) { | |
f(array[i]); | |
} | |
} | |
function foo() { | |
ret = 4; | |
return ret; | |
} |
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/node | |
// Ad-hoc attack for my own router ... :) | |
var fs = require('fs') | |
var request = require('request') | |
fs.readFile('passwords.txt', 'utf8', function (err, data) { | |
if (err) { | |
throw err | |
} | |
pws = data.split('\n') | |
pws.pop() |
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 <stdlib.h> | |
#include <stdio.h> | |
#include <string.h> | |
#include <assert.h> | |
void tokenize (const char *s, char ***tokens, size_t *tokens_length) { | |
char *current_ptr = NULL; | |
char *previous_ptr = NULL; | |
size_t characters_read = 0; | |
current_ptr = previous_ptr = s; |
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> | |
#include <string.h> | |
char *scanner(); | |
void my_realloc(char **str,int size); | |
int main(void){ | |
int size=100,i=0; | |
//scanf("%d",&n); | |
char **str,*p; |
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
<!doctype html> | |
<html> | |
<head> | |
<meta charset="UTF-8" /> | |
<link rel="stylesheet" href="bower_components/qunit/qunit/qunit.css"> | |
</head> | |
<body> | |
<div id="qunit"></div> | |
<div id="qunit-fixture"></div> | |
<script type="application/javascript" src="bower_components/qunit/qunit/qunit.js"></script> |
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
-----BEGIN PGP PUBLIC KEY BLOCK----- | |
Version: GnuPG v2 | |
mQENBFR6cpcBCADZp5qVuZG8N8S/fG680BrFoyckX3ptaBcIMAQejnH9OiV/4nVU | |
/v/zLnfDfmHa4Hs2GvzrKyYqIZDO3UPusNxvrRd0ejPn796lw99oeQ4sw/d5pK5v | |
4tUb20MMBsaitBZf/f95S05Y0bIiLh6aXCHHWmsnu9jh3gndB6YisahmE17V+wtl | |
emHDapS24HmVO0nvQZ61WNHCLdMAvqUKaFZRc7eR27/FgGejGGvXzn3KYyOQIC5U | |
NNFG6vFKBIkvyPREfSHV9LjlUkiABw5Bj2D7f7C9a5BfwmMpW0C5xs8ppP7W8pH9 | |
3YvxNqO0Y13CDfcddo659yrKcCfFNcDlhydxABEBAAG0I0dpdXNlcHBlIENyaW7D | |
siA8Z2l1c2NyaUBnbWFpbC5jb20+iQE9BBMBCgAnAhsDBQsJCAcDBRUKCQgLBRYC |
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 one seems to be hot stuff: find all the prime | |
;; numbers under a certain limit (e.g. 2048). | |
%include "asm_io.inc" | |
section .data | |
guess dd 0 | |
factor dd 0 | |
limit dd 0 | |
prompt db "Find primes up to: ", 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
;; ada_sum.asm | |
segment .text | |
global ada_sum | |
ada_sum: | |
;; Make room for the local variable sum ... | |
enter 4, 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
// Compile the whole stuff via | |
// nasm -f elf ada_sum.asm | |
// gcc -c ada.c | |
// gcc -o ada ada.o ada_sum.o | |
#include <stdio.h> | |
int ada_sum (int a, int b) __attribute__ ((cdecl)); | |
int main () { |