Skip to content

Instantly share code, notes, and snippets.

View CarlosRA97's full-sized avatar

Carlos Rivero Aro CarlosRA97

View GitHub Profile
@CarlosRA97
CarlosRA97 / juego-vida.py
Created January 1, 2016 19:01 — forked from astrojuanlu/juego-vida.py
Juego de la vida de Conway en Python
# coding: utf-8
"""Juego de la vida de Conway.
Autor: Juan Luis Cano <juanlu001@gmail.com>
El tablero es un array de NumPy, donde 0 significa célula muerta y 1 célula
viva. Se muestra una animación con matplotlib.
"""
@CarlosRA97
CarlosRA97 / installation.md
Created July 12, 2016 00:59 — forked from guillaumevincent/installation.md
A simple guide to install PyQt5 on Mac OS X 10.9 (Maverick) and use python 3.4 on a virtualenv.

Guide to install PyQt5 on Mac OS X with python 3.4 virtualenv

Description

A simple guide to install PyQt5 on Mac OS X 10.9 (Maverick) and use python 3.4 on a virtualenv.

Requirements

  • xcode 5.1.1
  • python 3.4.0
  • Qt libraries 5.2.1
@CarlosRA97
CarlosRA97 / encrypt_openssl.txt
Created September 10, 2016 22:51 — forked from crazybyte/encrypt_openssl.txt
File encryption using OpenSSL
For symmetic encryption, you can use the following:
To encrypt:
openssl aes-256-cbc -salt -a -e -in plaintext.txt -out encrypted.txt
To decrypt:
openssl aes-256-cbc -salt -a -d -in encrypted.txt -out plaintext.txt
For Asymmetric encryption you must first generate your private key and extract the public key.
@CarlosRA97
CarlosRA97 / http_get.go
Created October 5, 2016 20:25 — forked from ijt/http_get.go
Example of using http.Get in go (golang)
package main
import (
"fmt"
"io"
"log"
"net/http"
"os"
)
package gziphandler
import (
"compress/gzip"
"io"
"net/http"
"strings"
)
type gzipResponseWriter struct {

The current kernel/drivers of Fedora 24 do not support the Wifi chip used on my Mac Book Pro. Proprietary Broadcom drivers are packaged and available in the rpmfusion repo.

Verify that your card is a Broadcom using: lspci -vnn -d 14e4:

Sample output:

02:00.0 Network controller [0280]: Broadcom Corporation BCM4360 802.11ac Wireless Network Adapter [14e4:43a0] (rev 03)

Install

Install the rpmfusion repo, note only "nonfree" is required, as the Broadcom Driver is proprietry: http://rpmfusion.org/

@CarlosRA97
CarlosRA97 / buildMagic.cpp
Created January 18, 2018 00:00 — forked from juanfal/buildMagic.cpp
Using Siamese method fill a Magic Square Matrix
// buildMagic.cpp
// juanfc 2018-01-17
// Using Siamese method fill a Magic Square Matrix,
// odd fixed size.
// We have used a big square matrix, but used
// an extra parameter to restrict to that size
//
// Testing it building magic matrices up to a size
// checking they really are magic and printing them
// https://gist.github.com/6db44e77b75d3aacdfa70bdfb7972ef1
@CarlosRA97
CarlosRA97 / 04.pattern.cpp
Created February 7, 2018 13:37 — forked from juanfal/04.pattern.cpp
words letters coinciding with a pattern
// 04.pattern.cpp
// juanfc 2018-02-06
//
#include <iostream>
#include <array>
using namespace std;
const int PATLENGTH = 5;
const int NNONREPWORDS = 100;
@CarlosRA97
CarlosRA97 / 03.sudoku.cpp
Created February 7, 2018 13:37 — forked from juanfal/03.sudoku.cpp
Check validity of sudoku board
// 03.sudoku.cpp
// juanfc 2018-02-06
//
#include <iostream>
#include <array>
using namespace std;
const int N = 9;
typedef array<int, N> TRow;
@CarlosRA97
CarlosRA97 / 01.peaks.cpp
Created February 7, 2018 13:37 — forked from juanfal/01.peaks.cpp
Print peaks of a matrix
// 01.peaks.cpp
// juanfc 2018-02-06
#include <iostream>
#include <array>
using namespace std;
const int N = 3;
typedef array<int,N> TRow;
typedef array<TRow,N> TSqMat;