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
var dump = { | |
"log": { | |
"version": "1.2", | |
"creator": { | |
"name": "WebInspector", | |
"version": "537.11" | |
}, | |
"pages": [ | |
{ | |
"startedDateTime": "2012-11-27T17:23:49.877Z", |
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
#!/bin/bash | |
# add new content into the top of a file | |
# @param1: content to be added | |
# @param2: file where the content will be added | |
TEMPFILE="tmp.txt" | |
NEWCONTENT=$1 | |
FILE=$2 | |
(echo $NEWCONTENT; cat $FILE) > $TEMPFILE; mv $TEMPFILE $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
#!/bin/bash | |
# add new content into the top of a file | |
# usage: ./script.sh 'new content to be added' myFile.txt | |
# @param1: content to be added | |
# @param2: file where the content will be added | |
# @author: leo picado | |
TEMPFILE="tmp.txt" | |
NEWCONTENT=$1 | |
FILE=$2 |
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
; http://www.cin.ufpe.br/~if817/arquivos/asmtut/index.html#helloworld | |
; http://syscalls.kernelgrok.com/ | |
; hello world mas basico que encontre | |
section .data | |
msg: db 'Dar es dar y dar y dar y dar!',0xa ;el string que se va a imprimir | |
largo: equ $ - msg ;el largo del string | |
section .text | |
global _start ;must be declared for linker (ld) ??? |
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
; constants | |
section .data | |
lblZero: db 'Zero '; | |
lblOne: db 'One '; | |
lblTwo: db 'Two '; | |
lblNumLength: db 0x5; | |
lblErr: db 'There was an error.', 10; | |
lblErrLength: equ $ - lblErr; | |
lblInput: db 'Type a single digit number: ', 10; | |
lblInputLength: equ $ - lblInput; |
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
; constants | |
section .data | |
lblZero: db 'Zero '; | |
lblOne: db 'One '; | |
lblTwo: db 'Two '; | |
lblNumLength: db 0x5; | |
lblErr: db 'There was an error.', 10; | |
lblErrLength: equ $ - lblErr; | |
lblInput: db 'Type a single digit number: ', 10; | |
lblInputLength: equ $ - lblInput; |
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
; constants | |
section .data | |
lblZero: db 'Zero'; | |
lblOne: db 'One '; | |
lblNumLength: db 0x4; | |
lblErr: db 'There was an error.', 10; | |
lblErrLength: equ $ - lblErr; | |
lblInput: db 'Type a single digit number: ', 10; | |
lblInputLength: equ $ - lblInput; | |
tmp: db 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
; constants | |
section .data | |
lblZero: db 'Zero'; | |
lblOne: db 'One '; | |
lblNumLength: db 0x4; | |
tmp: db 0; | |
; code | |
section .text | |
global _start |
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
10 | |
5 15 | |
1) agregar 3 | |
- es 3 > 10? no | |
- 10 tiene un hijo izquierdo? si | |
- entonces vamos a la izquierda, 5 es la nueva raiz | |
- es 3 > 5? no | |
- 5 tiene un hijo izquierdo? no | |
- 3 es el hijo izquierdo de 5 |
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
10 | |
5 15 | |
0) agregar el primer nodo | |
- si la raiz esta vacia, se mete ahi | |
1) agregar 3 | |
- es 3 > 10? no | |
- 10 tiene un hijo izquierdo? si | |
- entonces vamos a la izquierda, 5 es la nueva raiz |