Skip to content

Instantly share code, notes, and snippets.

View EmilioBravo's full-sized avatar

Luis Escobar Bravo EmilioBravo

  • Asunción, Paraguay
View GitHub Profile
@EmilioBravo
EmilioBravo / paraguay.json
Created April 29, 2020 12:58 — forked from aVolpe/paraguay.json
GeoJson de los departamentos del Paraguay
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@EmilioBravo
EmilioBravo / kiosk-pi.txt
Created May 16, 2018 20:48 — forked from jongrover/kiosk-pi.txt
How to Kiosk Raspberry Pi
Software for the Project:
Raspbian Wheezy Debian Linux
Win32Disk Imager
The CanaKit comes with a pre-loaded SD card that includes the same version of Debian Wheezy that I used for this project. However, in an effort to get a little more speed out of the system, I used the 95MB/s Sandisk extreme listed above. It seemed to help, but I did not bench mark it beyond observation.
Anyway, lets get down to building a Raspberry Pi Web Kiosk.
Step 0: Get all of the hardware.
Step 1: Get all of the software.
@EmilioBravo
EmilioBravo / aes_enc_dec.php
Created May 26, 2017 22:57 — forked from turret-io/aes_enc_dec.php
AES encryption/decryption in PHP
<?php
// DEFINE our cipher
define('AES_256_CBC', 'aes-256-cbc');
// Generate a 256-bit encryption key
// This should be stored somewhere instead of recreating it each time
$encryption_key = openssl_random_pseudo_bytes(32);
// Generate an initialization vector
// This *MUST* be available for decryption as well
@EmilioBravo
EmilioBravo / a2dp.py
Created November 19, 2016 19:54 — forked from pylover/a2dp.py
Fixing bluetooth stereo headphone/headset problem in ubuntu 16.04, 16.10 and also debian jessie, with bluez5.
#! /usr/bin/env python3.5
"""
####################################################################
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2016 Vahid Mardani
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
@EmilioBravo
EmilioBravo / gist:7ee9d4baccd6f87a92a73cb2c4992092
Created September 2, 2016 20:07 — forked from bzitzow/gist:9056b9147698f171eb2d
Phonegap SQLite Database Schema Migrations
//phoneGap HTML5 SQLite database schema migration example
var db = null;
var current_migration = null;
var current_schema_version = null;
// keep migration version order
var db_migrations = {
v1: {
version: "1.0",
up: function(tx) {
{{-- Define all our servers --}}
@servers(['staging' => '', 'production' => ''])
@setup
{{-- The timezone your servers run in --}}
$timezone = 'Europe/Amsterdam';
{{-- The base path where your deployments are sitting --}}
$path = '/var/www/site.com/htdocs';

Conventions:

Defining Eloquent model (will assume that DB table named is set as plural of class name and primary key named "id"):

class Shop extends Eloquent {}

Using custom table name

protected $table = 'my_shops';