This file contains 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
#!/bin/sh | |
#Author: Gabriel Espinoza<virtuosonic at github> | |
#Desc: execute comand until it runs successfully(returning 0) | |
#Date: 23-Oct-2024 | |
usage() | |
{ | |
echo "usage: retryfailed <command> [arg1 [arg2...]]" | |
} |
This file contains 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
/*************************************** | |
Author: Gabriel Espinoza | |
Desc: They say lock-based concurrency is slow | |
let's test how slow is slow | |
***************************************/ | |
#include <iostream> | |
#include <mutex> | |
#include <functional> | |
#include <chrono> |
This file contains 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 <iostream> | |
using namespace std; | |
struct S { | |
S() {cout << "S::S() " << id << "\n";} | |
S(const S&) {cout << "S::S(const S&) " << id << "\n";} | |
S(S&&) {cout << "S::S(const S&&) " << id << "\n";} | |
S& operator=(const S& other) { cout << "S::operator=(const S& other) " << id << "\n";return *this;} |
This file contains 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
#!/bin/bash | |
#Author: Gabriel Espinoza <virtuosonic @ github> | |
#Date: 2023-12-26 | |
#Desc: prints what libraries are linked to executables on $testdir | |
testdir=/usr/bin | |
for program in `ls $testdir` |
This file contains 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 <iostream> | |
#include <algorithm> | |
#include <array> | |
class User { | |
protected: | |
static int* data; | |
static int* auxData1; | |
static int* auxData2; | |
int tamannoAD1; |
This file contains 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
/**********************\ | |
Name: format_test.cpp | |
Author: Gabriel Espinoza <[email protected]> | |
License: MIT | |
Desc: string concatenation and output test benchmark | |
*/ | |
//!!!! C++ 2020 required | |
#include <iostream> |
This file contains 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 <iostream> | |
#include <tuple> | |
using namespace std; | |
int c_style_function(int* n, double* f,const char* c) | |
{ | |
*n = 42; | |
*f = 3.14159; | |
c = "a"; | |
return 0; |
This file contains 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
/****************************************************************************** | |
program to test several functions to tokenize strings | |
*******************************************************************************/ | |
#include <iostream> | |
#include <chrono> | |
#include <vector> | |
#include <functional> | |
#include <sstream> |
This file contains 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
#!/bin/bash | |
cd ~/rpi-qt | |
PIADDR='192.168.0.2' | |
rsync -avz --rsync-path="sudo rsync" --delete pi@$PIADDR:/lib sysroot | |
rsync -avz --rsync-path="sudo rsync" --delete pi@$PIADDR:/usr/include sysroot/usr | |
rsync -avz --rsync-path="sudo rsync" --delete pi@$PIADDR:/usr/lib sysroot/usr | |
rsync -avz --rsync-path="sudo rsync" --delete pi@$PIADDR:/opt/vc sysroot/opt |
This file contains 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 <iostream> | |
#include <iomanip> | |
#include <vector> | |
#include <algorithm> | |
using namespace std; | |
bool isEven(int n ){ | |
return !(n % 2); |
NewerOlder