Skip to content

Instantly share code, notes, and snippets.

View ALEXOTANO's full-sized avatar
🎯
Focusing

Alex Otano ALEXOTANO

🎯
Focusing
View GitHub Profile
@salvadorGlez
salvadorGlez / maerialStyles.code-snippets.md
Last active April 27, 2021 18:36
This is a Snippet for the styles used in Material UI
{
	"Styles": {
		"prefix": "mstyles",
		"body": [
			"import { makeStyles, createStyles } from '@material-ui/core/styles';",
			"//import useMediaQuery from '@material-ui/core/useMediaQuery';",
			"",
			"export const useStyles =  (props = {}) => {",
 " //const matches = useMediaQuery('(min-width:450px)');",
@ALEXOTANO
ALEXOTANO / configure-ubuntu-ftp-using-vsftp-TLS.md
Created June 8, 2020 14:57
Configure FTP on Ubuntu using VSFTP and TLS

How to correctly configure FTP on ubuntu

1. Install FTP Service

sudo apt-get update
sudo apt install vsftpd

2. Backup config file

@peteristhegreat
peteristhegreat / Readme.md
Last active July 23, 2024 00:09
Realtek bluetooth usb adapter RTL8671b
@ALEXOTANO
ALEXOTANO / Material-Angular-Password- visible_invisible.md
Last active August 14, 2019 20:24
a Input using Angular Material + Fontawsome with the visible not visible functionality clicking on the eye icon at the right
View/Hide Password Input

Remember to change the passH variable to a diffrent one in each input you place in the dom within the same scope. Using the name/id + and H ( as in Hide xD ) is usally a good idea to avoid repeating.

<mat-form-field>
    <input [type]="!passH ? 'password' : 'text'" matInput placeholder="A new Password" [(ngModel)]="pass" name="pass">
    <div matSuffix (click)="passH = !passH"><i class="fas fa-{{!passH ? 'eye-slash' : 'eye'}} "></i></div>
@mcfrojd
mcfrojd / Shield_Intents.MD
Last active July 27, 2024 13:39
Working INTENTS to use with Community Hass.io Add-ons: Android Debug Bridge for your Nvidia Shield TV

Latest Update 2021-03-06 : New image showing the new "Services" in Home Assistant and got some tips from the comments below.

Credits and thanks: Home Assistant Forum users & Github users: @ocso, @wiphye, @teachingbirds, @tboyce1, @simbesh, @JeffLIrion @ff12 @rebmemer @siaox @DiederikvandenB @Thebuz @clapbr @Finsterclown


Start apps on your android device (in the examples below, my Nvidia Shield TV) from Home Assistant

alt text

Starts Youtube App

entity_id: media_player.shield
command: >-
@alfchee
alfchee / NumeroALetras.js
Last active July 11, 2024 23:02
Código en JavaScript que convierte números a letras, bastante útil para formularios de documentos contables y similares
/*************************************************************/
// NumeroALetras
// The MIT License (MIT)
//
// Copyright (c) 2015 Luis Alfredo Chee
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
@tkon99
tkon99 / name.js
Last active April 19, 2024 14:38
Random Name Generator for Javascript
/*
(c) by Thomas Konings
Random Name Generator for Javascript
*/
function capFirst(string) {
return string.charAt(0).toUpperCase() + string.slice(1);
}
function getRandomInt(min, max) {
@learncodeacademy
learncodeacademy / node-deploy-as-upstart-service.md
Last active August 16, 2022 17:35
Deploy Node.js app on Ubuntu as Upstart Service - instead of using Forever

Deploying a node app with Forever is great...until your server restarts unexpectedly. Then your app stops running and you have to re-deploy.

To get around this, we're going to run our node app as an Upstart service. Upstart services are great, because, once started, the system auto-restarts them if they fail, or if the server restarts.

###Step 1: Create a service for your node app

  • ssh in as root ssh root@youripaddress
  • Create a node-app.conf file in /etc/init
    IMPORTANT: whatever filename you pick is what you will use to start|stop|restart your service i.e. service node-app start
@6174
6174 / Random-string
Created July 23, 2013 13:36
Generate a random string in JavaScript In a short and fast way!
//http://stackoverflow.com/questions/105034/how-to-create-a-guid-uuid-in-javascript
Math.random().toString(36).substring(2, 15) + Math.random().toString(36).substring(2, 15);