Skip to content

Instantly share code, notes, and snippets.

Avatar

Carlos Rivero Aro CarlosRA97

View GitHub Profile
@CarlosRA97
CarlosRA97 / make-keys.sh
Created May 5, 2020 — forked from suru-dissanaike/make-keys.sh
Create self-signed certificates for Eclipse Mosquitto MQTT broker
View make-keys.sh
#!/bin/bash
IP="192.168.1.22"
SUBJECT_CA="/C=SE/ST=Stockholm/L=Stockholm/O=himinds/OU=CA/CN=$IP"
SUBJECT_SERVER="/C=SE/ST=Stockholm/L=Stockholm/O=himinds/OU=Server/CN=$IP"
SUBJECT_CLIENT="/C=SE/ST=Stockholm/L=Stockholm/O=himinds/OU=Client/CN=$IP"
function generate_CA () {
echo "$SUBJECT_CA"
openssl req -x509 -nodes -sha256 -newkey rsa:2048 -subj "$SUBJECT_CA" -days 365 -keyout ca.key -out ca.crt
View keybase.md

Keybase proof

I hereby claim:

  • I am carlosra97 on github.
  • I am carlosra97 (https://keybase.io/carlosra97) on keybase.
  • I have a public key ASDsRDLch2fup3pGxV981Uc31OoSJsLDCYIE2Bvex3rNtQo

To claim this, I am signing this object:

@CarlosRA97
CarlosRA97 / git.sh
Last active Jul 7, 2019
Git client for Docker RPI similar to Alpine Git
View git.sh
#!/bin/bash
docker run -ti --rm -v $1:/git -v $HOME/.ssh:/root/.ssh carlosra97/raspberrypi3-alpine-git ${@:2}
@CarlosRA97
CarlosRA97 / 01.dominator.cpp
Created Feb 7, 2018 — forked from juanfal/01.dominator.cpp
dominator of an array
View 01.dominator.cpp
// 01.dominator.cpp
// juanfc 2018-02-06
#include <iostream>
#include <array>
using namespace std;
const int N = 9;
typedef array<int,N> TVec;
int dominator(TVec a);
@CarlosRA97
CarlosRA97 / 01.peaks.cpp
Created Feb 7, 2018 — forked from juanfal/01.peaks.cpp
Print peaks of a matrix
View 01.peaks.cpp
// 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;
@CarlosRA97
CarlosRA97 / 01.peaks.cpp
Created Feb 7, 2018 — forked from juanfal/01.peaks.cpp
Print peaks of a matrix
View 01.peaks.cpp
// 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;
@CarlosRA97
CarlosRA97 / 03.sudoku.cpp
Created Feb 7, 2018 — forked from juanfal/03.sudoku.cpp
Check validity of sudoku board
View 03.sudoku.cpp
// 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 / 04.pattern.cpp
Created Feb 7, 2018 — forked from juanfal/04.pattern.cpp
words letters coinciding with a pattern
View 04.pattern.cpp
// 04.pattern.cpp
// juanfc 2018-02-06
//
#include <iostream>
#include <array>
using namespace std;
const int PATLENGTH = 5;
const int NNONREPWORDS = 100;
@CarlosRA97
CarlosRA97 / buildMagic.cpp
Created Jan 18, 2018 — forked from juanfal/buildMagic.cpp
Using Siamese method fill a Magic Square Matrix
View buildMagic.cpp
// 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
View dottedFrame.cpp
#include <iostream>
using namespace std;
int main() {
cout << "Enter the lentgh of the box: " << endl;
int boxSize = 0;
cin >> boxSize;
for (int row = 0; row < boxSize; row++) {
You can’t perform that action at this time.