Skip to content

Instantly share code, notes, and snippets.

View leopic's full-sized avatar

Leo Picado leopic

View GitHub Profile
@leopic
leopic / har-nalizer.js
Created November 27, 2012 22:04
analyzing our PDP requests
var dump = {
"log": {
"version": "1.2",
"creator": {
"name": "WebInspector",
"version": "537.11"
},
"pages": [
{
"startedDateTime": "2012-11-27T17:23:49.877Z",
#!/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
#!/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
; 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) ???
; 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;
; 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;
; 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;
; constants
section .data
lblZero: db 'Zero';
lblOne: db 'One ';
lblNumLength: db 0x4;
tmp: db 0;
; code
section .text
global _start
@leopic
leopic / test
Created December 2, 2012 23:02
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
@leopic
leopic / test
Created December 2, 2012 23:22
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