Skip to content

Instantly share code, notes, and snippets.

View dbarrerap's full-sized avatar
🏠
Working from home

David E. Barrera dbarrerap

🏠
Working from home
View GitHub Profile
@dbarrerap
dbarrerap / android_php.php
Last active September 20, 2016 00:45
PHP for Tutorial
<?php
#Ensure that the client has provided a value for "FirstNameToSearch"
if (isset($_POST["FirstNameToSearch"]) && $_POST["FirstNameToSearch"] != ""){
#Setup variables
$firstname = $_POST["FirstNameToSearch"];
#Connect to Database
$con = mysqli_connect("localhost","root","", "mytestdatabase");
@dbarrerap
dbarrerap / android_sql.sql
Last active September 20, 2016 00:46
SQL for tutorial
-- phpMyAdmin SQL Dump
-- version 3.5.1
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Jun 15, 2013 at 10:07 PM
-- Server version: 5.5.24-log
-- PHP Version: 5.3.13
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
#include <IRremote.h>
#define foreachled for (int i = 0; i < sizeof(rgbLED); i++)
// Codes for Remote Control
#define RivieraRED 0x2FD52AD
#define RivieraGREEN 0x2FDD22D
#define RivieraBLUE 0x2FDB24D
#define RivieraPOWER 0x2FD48B7
#define RivieraUP 0x2FD41BE
#include <IRremote.h>
// Riviera Remote Control Codes
#define RivieraRED 0x2FD52AD
#define RivieraGREEN 0x2FDD22D
#define RivieraYELLOW 0x2FD32CD
#define RivieraBLUE 0x2FDB24D
#define RivieraPOWER 0x2FD48B7
// RGB LED pins
#include <IRremote.h>
#include <SoftwareSerial.h>
#define POWER 0x2FD48B7
#define SOURCE 0x2FDF00F
#define UP 0x2FD41BE
#define DOWN 0x2FDC13E
#define OK 0x2FD916E
#define BAUD_RATE 9600
@dbarrerap
dbarrerap / cowroot.c
Created October 28, 2016 18:24 — forked from rverton/cowroot.c
CVE-2016-5195 (DirtyCow) Local Root PoC
/*
* (un)comment correct payload first (x86 or x64)!
*
* $ gcc cowroot.c -o cowroot -pthread
* $ ./cowroot
* DirtyCow root privilege escalation
* Backing up /usr/bin/passwd.. to /tmp/bak
* Size of binary: 57048
* Racing, this may take a while..
* /usr/bin/passwd overwritten
#include <SPI.h>
// For I2C LCD: https://bitbucket.org/fmalpartida/new-liquidcrystal/overview
#include <Wire.h>
#include <LiquidCrystal_I2C.h>
#include <Bridge.h>
#include <BridgeClient.h>
#include <HttpClient.h>
/**
* Sentry Park S.A.V.R
*
* Diagrama de Conexiones
*
* Arduino | Componente
* 10, 11 | TX, RX HC-06, Comunicacion Bluetooth
* 9 | SIG Servo de Entrada
* 8 | SIG Servo de Salida
* 7 | OUT Sensor de Obstaculo de Entrada
# Convertidor de Moneda usando Python
# Destrezas:
# - Llamado de APIs
# - Crear una Interfaz Grafica
import tkinter as tk
class Converter:
def __init__(self, master):
frame = tk.Frame(master)
frame.pack()