This file contains hidden or 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
    
  
  
    
  | # crear db, create db | |
| create database if not exists prueba default character set utf8; | |
| use prueba; | |
| # crear tabla, create table | |
| create table if not exists productos(id integer not null key auto_increment, | |
| nombre varchar(255) not null, | |
| precio decimal(9,2) not null, | |
| stock integer not null, | |
| attr json, | 
  
    
      This file contains hidden or 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
    
  
  
    
  | ambos: pthread-args pthread-noargs | |
| pthread-args: pthread-args.c | |
| gcc -pthread -std=c99 -Wall -Wextra -pedantic -o pthread-args pthread-args.c | |
| pthread-noargs: pthread-noargs.c | |
| gcc -pthread -std=c99 -Wall -Wextra -pedantic -o pthread-noargs pthread-noargs.c | |
| clean: | |
| rm -f pthread-args pthread-noargs | 
  
    
      This file contains hidden or 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> | |
| int main(void) { | |
| const char *sharks[9] = { "baby", "mommy", "daddy", "grandma", | |
| "grandpa", "let's go hunt", "run away", "safe at last", | |
| "it's the end" | |
| }; | |
| char * is_shark = " shark"; | 
  
    
      This file contains hidden or 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
    
  
  
    
  | --- binary-gap-old.c 2016-03-21 15:59:35.872587138 -0700 | |
| +++ binary-gap.c 2016-03-21 15:59:40.936787734 -0700 | |
| @@ -1,16 +1,17 @@ | |
| int binary_gap(int N) { | |
| int c=0; | |
| int m=0; | |
| - if (N == 0) | |
| - return 1; | |
| + while (N > 1 && N % 2 == 0) | |
| + N = N / 2; | 
  
    
      This file contains hidden or 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 mod(int a, int b) { | |
| if (a == 0) | |
| return 0; | |
| if (a > 0 && b > 0) { | |
| return a % b; | |
| } | |
| if (a < 0 && b > 0) { | |
| return (b - ((-a) % b)) % b; | 
  
    
      This file contains hidden or 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 binary_gap_oa1(int N) { | |
| int c=0; | |
| int m=0; | |
| if (N == 0) | |
| return 1; | |
| while (N > 1) { | |
| if (N % 2 == 0) { | |
| c = c + 1; | |
| if (c > m) | |
| m = c; | 
  
    
      This file contains hidden or 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> | |
| int main(int argc, char **argv) { | |
| int i, j; | |
| char *f = "fizz"; | |
| char *b = "buzz"; | |
| char *fb = "fizzbuzz"; | 
  
    
      This file contains hidden or 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/env pinpoint | |
| [#554433] | |
| [shading-opacity=0] | |
| ----- [text-align=center] | |
| <b><big><big><big>Alternus</big></big></big></b> | |
| Octavio Alvarez | 
  
    
      This file contains hidden or 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
    
  
  
    
  | Prepared for the San Diego Kernel Panic Linux User Group. | |
| Presented on November 14th, 2014. | |
| Presenter: Octavio Alvarez | |
| This is my cheat sheet. Uploaded on request of the KPLUG team. | |
| Presentation was a variation of this walkthrough using a | |
| Virtualbox VM with 7 extra disks of 100 MB each (/dev/sdb to | |
| /dev/sdh). | 
  
    
      This file contains hidden or 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
    
  
  
    
  | alvarezp@alvarezp-laptop:~$ export x='() { echo b; }; echo vulnerable' | |
| alvarezp@alvarezp-laptop:~$ bash | |
| vulnerable | |
| alvarezp@alvarezp-laptop:~$ exit | |
| alvarezp@alvarezp-laptop:~$ | 
NewerOlder