Skip to content

Instantly share code, notes, and snippets.

View MrAlex6204's full-sized avatar
๐Ÿ˜„
I'm happy to know that GitHub is lil bit free

Alex Vera MrAlex6204

๐Ÿ˜„
I'm happy to know that GitHub is lil bit free
  • H. Matamoros ,Tamulipas
View GitHub Profile
@MrAlex6204
MrAlex6204 / steper.css
Last active February 16, 2023 19:13
Create a HTML stepper with a sonar effect on active step
:root {
--active-text-color: rgb(13,48,195);
--active-icon-text-color: #fff;
--active-bg-color: rgb(13,48,195);
--active-border-color: rgb(13,48,195);
--active-line-color: #0d30c3;
--active-sonar-bg-color: rgb(13,48,195);
--active-sonar-border-color: darkblue;
@MrAlex6204
MrAlex6204 / DotnetCoreSite.conf
Created April 22, 2022 15:08
Nginx confgiration for DotnetCore Site
#This file is to configure nginx site
#copy this file to /etc/nginx/site-available/
#and create a symbolic link to /etc/nginx/site-enabled/
#Execute the below command to verufy the conf file
# > nginx -t
#Remember to reload nginx using the below command
#> sudo nginx -s reload
#Restar the Nginx service
#> sudo sudo systemctl restart nginx
@MrAlex6204
MrAlex6204 / task.json
Created April 5, 2022 20:45
VSCode Task to upload an entire folder to AWS Linux Server via SSH
{
"label": "Upload - Entire Folder",
"type": "shell",
"command": "scp",
"args": [
"-r",
"-i",
"\"SRV.pem\"",
"${workspaceFolder}\\",
"linux_user@{your AWS address goes here}:/home/ubuntu/{server side folder path}/"
@MrAlex6204
MrAlex6204 / dotnetcore.service
Created April 5, 2022 19:49
Create a Dotnet Core service for Systemd in Linux
[Unit]
Description=>>>>>> DotNetCore application service<<<<<<
After=network.target
[Service]
User=mralex6204
Group=www-data
#Application Working directory
WorkingDirectory=/home/ubuntu/ASPNetCoreApp
@MrAlex6204
MrAlex6204 / FirestoreProvider.dart
Created April 5, 2022 19:33
Flutter Firebase Provider class example. Use this class to create your Firestore provider
import 'package:cloud_firestore/cloud_firestore.dart';
class FirestoreProvider {
static final FirebaseFirestore _firestore = FirebaseFirestore.instance;
static final FirestoreProvider _db = FirestoreProvider._getInstance();
static final COMMENTS_COLLECTION= "AboutComments";
FirestoreProvider._getInstance(){
//Realtime events listeners
@MrAlex6204
MrAlex6204 / events_provider.dart
Last active April 1, 2022 21:01
Flutter Events Provider - This class is an example how to create a event provider in flutter
class EventsProvider {
static final EventsProvider _events = EventsProvider._getInstance(); //==>Singleton pattern
final _onCommentsChangeNotifyStream = StreamController<List<CommentModel>>.broadcast();
final _onTotalCommentsChangeNotifyStream = StreamController<int>.broadcast();
EventsProvider._getInstance(){
this.onCommentsChangeNotifyStream.listen((lstComments) {
@MrAlex6204
MrAlex6204 / myservice.service
Created March 29, 2022 13:46
Create python service in linux with Gunicorn
[Unit]
Description=>>>>>> Python REST <<<<<<
After=network.target
[Service]
User=ubuntu
Group=www-data
WorkingDirectory=/home/ubuntu/PythonREST
#start gunicorn daemon
@MrAlex6204
MrAlex6204 / table_template.dart
Last active April 1, 2022 20:52
Flutter handle a SQLite table
/*
*
* This Dart class help to handle a SQLite table easily
* To create & initilize table data in the DB creation execute the below code
* await db.execute(TblAreas.createQuery());
* await TblAreas.initilizeData(db);
*
* To run a table backup when the database upgrade to a new version execute the below code
* final area_bkp = await TblAreas.getBackUp(db);
*
@MrAlex6204
MrAlex6204 / A short way to find View in android
Created July 15, 2015 21:44
Get a control by id in android like jQuery
/*
Add this Gist in your current class if you want or do it static for a global access
*/
public android.view.View $(int id){
return findViewById(id);
}