Skip to content

Instantly share code, notes, and snippets.

View alvinmatias69's full-sized avatar
🎯
Focusing

Matias Alvin alvinmatias69

🎯
Focusing
View GitHub Profile
@alvinmatias69
alvinmatias69 / orba_sort.sh
Last active December 31, 2019 03:44
High performance sort that will remove every inappropriate element to create sorted ascending list. Always operate in O(n)
#!/bin/sh
TEMP=-9999999
for item in "$@"
do
if [ "$TEMP" -lt "$item" ]
then
printf "%s " "$item"
fi
TEMP=$item
done
@alvinmatias69
alvinmatias69 / Conversation.js
Created September 30, 2018 18:35
A class composition for decomposing data from react component
export default class Conversation {
constructor() {
this.conversations = [];
}
process(conversations) {
this.conversations = conversations.map(item => ({
...item,
date: parseDate(item.date),
selected: false,
@alvinmatias69
alvinmatias69 / App.js
Created September 30, 2018 16:57
Simple React Chat UI snippets
...
processData(data) {
const conversations = data.map(item => ({
...item,
date: parseDate(item.date),
selected: false,
}));
this.setState({ conversations });
}
#include <iostream>
using namespace std;
int main () {
int arr[6] = {15, 14, 10, 7, 3};
int insert = 9;
int found_idx = 0;
int idx = 0;
bool found = false;
@alvinmatias69
alvinmatias69 / queue.cpp
Created April 17, 2018 16:29
Queue mini project
#include <cstdlib>
#include <iostream>
#include <math.h>
#include <ctime>
using namespace std;
class Car {
float init_speed;
float safe_speed;

Keybase proof

I hereby claim:

  • I am alvinmatias69 on github.
  • I am alvinmatias (https://keybase.io/alvinmatias) on keybase.
  • I have a public key ASA3FBQkmbb9Y_C5YXbbbhS1KROCgNdkTgglvNRDUR6Ligo

To claim this, I am signing this object:

Keybase proof

I hereby claim:

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

To claim this, I am signing this object: