Skip to content

Instantly share code, notes, and snippets.

View mreis1's full-sized avatar

Reis mreis1

View GitHub Profile
@mreis1
mreis1 / component.html
Created January 10, 2024 10:13
Angular (NG): Snippet to display a count down in seconds
Time Left: {{countDownSecondsLeft}}
@mreis1
mreis1 / AndroidManifest.xml
Created July 13, 2023 10:04
Android 12 Settings for bluetooth devices
<!-- took from: https://developer.android.com/guide/topics/connectivity/bluetooth/permissions -->
<?xml version='1.0' encoding='utf-8'?>
<manifest ....your_attributes>
<!-- ... your settings and <application tag...>-->
<!-- Request legacy Bluetooth permissions on older devices. -->
<uses-permission android:name="android.permission.BLUETOOTH"
android:maxSdkVersion="30" />
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN"
@mreis1
mreis1 / Fix_Spotlight_MacOS_BigSur.sh
Last active December 10, 2022 18:55
Fix Spotlight MacOS BigSur
# Verify the state
sudo mdutil -sav
#/:
# Indexing enabled.
# Scan base time: 2022-12-10 02:39:21 +0000 (58261 seconds ago), reasoning: '(null)'
#/System/Volumes/Data:
# Indexing disabled.
#/Volumes/MR_DATA:
# Indexing and searching disabled.
@mreis1
mreis1 / angular-cli-node-js-typescript-rxjs-compatiblity-matrix.csv
Created January 17, 2022 15:11 — forked from LayZeeDK/angular-cli-node-js-typescript-rxjs-compatiblity-matrix.csv
Angular CLI, Angular, Node.js, TypeScript, and RxJS compatibility matrix. Based on changelogs, metadata, and hands-on experience. Major Node.js and RxJS versions above officially supported versions are not listed. Note that minor TypeScript versions also contain breaking changes.
Angular CLI version Angular version Node.js version TypeScript version RxJS version
1.0.0-beta.17 (package name: angular-cli) 2.0.x 6.9.x or later minor version 2.0.x 5.0.x or later minor version
1.0.0-beta.20-1 (package name: angular-cli) 2.1.x 6.9.x or later minor version 2.0.x 5.0.x or later minor version
1.0.0-beta.22-1 (package name: angular-cli) 2.2.x 6.9.x or later minor version 2.0.x 5.0.x or later minor version
1.0.0-beta.30 2.3.x 6.9.x or later minor version 2.0.x 5.0.x or later minor version
1.0.0-rc.4 2.4.x 6.9.x or later minor version 2.0.x 5.0.x or later minor version
1.0.6 4.0.x/4.1.x 6.9.x or later minor version 2.2.x 5.0.x or later minor version
1.1.3 4.0.x/4.1.x 6.9.x or later minor version 2.3.x 5.0.x or later minor version
1.2.7 4.0.x/4.1.x 6.9.x or later minor version 2.3.x 5.0.x or later minor version
1.3.2 4.2.x/4.3.x/4.4.x 6.9.x or later minor version 2.4.x 5.0.x or later minor version
#!/usr/bin/env node
"use strict";
console.log("This is pid " + process.pid);
setTimeout(function () {
process.on("exit", function () {
require("child_process").spawn(process.argv.shift(), process.argv, {
cwd: process.cwd(),
@mreis1
mreis1 / letsencrypt_2020.md
Created March 29, 2021 11:06 — forked from cecilemuller/letsencrypt_2020.md
How to setup Let's Encrypt for Nginx on Ubuntu 18.04 (including IPv6, HTTP/2 and A+ SSL rating)

How to setup Let's Encrypt for Nginx on Ubuntu 18.04 (including IPv6, HTTP/2 and A+ SLL rating)


Virtual hosts

Let's say you want to host domains first.com and second.com.

Create folders for their files:

@mreis1
mreis1 / MySQL8-Readme.md
Last active January 16, 2021 11:21 — forked from jansanchez/gist:7893091
MySQL lower case table names sensitive in linux
@mreis1
mreis1 / how-to-update-reactive-form-validators-programatically.ts
Last active December 22, 2020 09:18
How to update reactive form validators programatically?
emailRequired = false;
ngOnInit() {
this.participantForm = this.formBuilder.group({
firstName: '',
lastName: '',
email: ['', [Validators.email, Validators.required]],
sms: null,
places: 1,
shareCode: '',
@mreis1
mreis1 / README.md
Last active December 9, 2020 17:19
DaySpan in moment.js

Both implementations must return 1.5

From date = 01/01/2000

To date = 02/01/2000 12:00:00

Fractional days difference = 1.5 days

@mreis1
mreis1 / ionic-5-default-theme-variables.scss
Created November 20, 2020 10:52
Ionic 5 - Theme variables
// Ionic Variables and Theming. For more info, please see:
// http://ionicframework.com/docs/theming/
/** Ionic CSS Variables **/
:root {
/** primary **/
--ion-color-primary: #3880ff;
--ion-color-primary-rgb: 56, 128, 255;
--ion-color-primary-contrast: #ffffff;
--ion-color-primary-contrast-rgb: 255, 255, 255;