Skip to content

Instantly share code, notes, and snippets.

View sebaxtian's full-sized avatar
:octocat:
Software Engineer

Sebastian Rios Sabogal sebaxtian

:octocat:
Software Engineer
View GitHub Profile
@sebaxtian
sebaxtian / clearswap.sh
Created April 24, 2024 04:28
Script to clean Swap memory on Debian/Ubuntu
#!/bin/bash
#
# Script to clean Swap memory
#
# Unofficial Documentation: https://tecadmin.net/clear-linux-cache/
# https://www.tecmint.com/clear-ram-memory-cache-buffer-and-swap-space-on-linux/
#
# Date: April 23, 2014
# Author: Sebastian Rios Sabogal - sebaxtianrioss@gmail.com
@sebaxtian
sebaxtian / clearcacheram.sh
Created April 24, 2024 04:26
Script to clean RAM Cache, Buffer on Debian/Ubuntu
#!/bin/bash
#
# Script to clean RAM Cache, Buffer
#
# Unofficial Documentation: https://tecadmin.net/clear-linux-cache/
# https://www.tecmint.com/clear-ram-memory-cache-buffer-and-swap-space-on-linux/
#
# Date: April 23, 2014
# Author: Sebastian Rios Sabogal - sebaxtianrioss@gmail.com
@sebaxtian
sebaxtian / install-docker-ce.sh
Created April 23, 2024 16:25
Unofficial script to install Docker on Ubuntu
#!/bin/bash
#
# Unofficial script to install Docker on Ubuntu
#
# Documentacion Oficial: https://docs.docker.com/engine/install/ubuntu/#install-using-the-repository
#
# Tested on: Ubuntu 22.04.4 LTS
#
# Date: April 23, 2014
@sebaxtian
sebaxtian / bash_env.md
Created May 5, 2020 02:43
How to load environment variables on Bash Linux

Hi everyone, this works for me:

.env file

# Environment Variables
KAGGLE_USERNAME=sebaxtian
KAGGLE_KEY=example_kaggle_key
@sebaxtian
sebaxtian / built-in-models.js
Created January 17, 2019 02:53
Built in models example in LoopBack.
'use strict';
const server = require('../server');
const dataSource = server.dataSources.dbauth;
const lblModels = ['AccessToken', 'ACL', 'RoleMapping', 'Role', 'Usuario'];
dataSource.automigrate(lblModels, function (error) {
if (error) throw error;
@sebaxtian
sebaxtian / model-config.json
Created January 17, 2019 02:51
Config example AccessToken for model Usuario with base model User en LoopBack.
{
"_meta": {
"sources": [
"loopback/common/models",
"loopback/server/models",
"../common/models",
"./models"
],
"mixins": [
"loopback/common/mixins",
@sebaxtian
sebaxtian / descargar-csv.js
Created October 5, 2018 20:16
Crear y Descargar Archivo CSV
onClickCsv($event) {
console.log('Click en Descargar CSV');
console.log(this.equipos);
// Construye el encabezado del CSV
let csvContent = 'codInvent, cantAtr, cantAtrOk, cantAtrError, cantAtrVacios, atrError\r\n';
// Agrega el contenido al CSV
this.equipos.forEach((element) => {
csvContent += element.codInvent + ',';
csvContent += element.cantAtr + ',';
csvContent += element.cantAtrOk + ',';
@sebaxtian
sebaxtian / bashrc
Last active December 19, 2019 20:39
Setup Prompt Colors and Styles within .bashrc file
#
# Prompt Colors and Styles:
#
# Copy and paste the contenct below at the end of the .bashrc file
#
# Prompt Colors and Styles
N='\[\033[0m\]' #regular text
HC='\[\033[1m\]' #bold text
BLN='\[\033[5m\]' #blink efect
@sebaxtian
sebaxtian / basic-git-commands.md
Last active April 10, 2020 14:09
Basic Git Commands

Create Develop Branch on Git

prompt$ git branch develop
prompt$ git push -u origin develop
prompt$ git checkout develop

Create New Feature Branch on Git

prompt$ git checkout -b some-feature develop
@sebaxtian
sebaxtian / Main.cpp
Created July 26, 2014 22:05
Ejemplo típico de Hola Mundo en C++
#include <iostream>
using namespace std;
int main()
{
cout << "El Tipico Hola Mundo !!" << endl; // Escribe un mensaje en pantalla
cout << "Escrito desde C++" << endl;
cout << "Hola Mundo !!";