Skip to content

Instantly share code, notes, and snippets.

View vital-tech-results's full-sized avatar
😂

vital-tech-results

😂
View GitHub Profile
@vital-tech-results
vital-tech-results / SampleOfLocalNotifications.js
Created June 15, 2020 19:43 — forked from VeraZab/LocalNotifications.js
Simple local notification with Expo
import React, {Component} from 'react';
import {TextInput, View, Keyboard} from 'react-native';
import {Constants, Notifications, Permissions} from 'expo';
export default class Timer extends Component {
onSubmit(e) {
Keyboard.dismiss();
const localNotification = {
title: 'done',
@vital-tech-results
vital-tech-results / default for all CSS files.css
Created July 9, 2022 23:20
frontend masters Jen Kramer suggested this should be default on every CSS file
/* Border box declaration https://www.paulirish.com/2012/box-sizing-border-box-ftw/ */
html {
box-sizing: border-box;
}
/* inherit border-box on all elements in the universe and before and after */
*, *:before, *:after {
@vital-tech-results
vital-tech-results / Force https via .htaccess.html
Last active July 9, 2022 23:22
// source: https://www.namecheap.com/support/knowledgebase/article.aspx/9770/38/how-to-use-htaccess-to-redirect-to-https-in-cpanel // Redirect from http:// to https:// or https://www having CloudFlare Flexible SSL mode //a) Basic http:// to https:// redirection, but this block should be used along with CloudFlare Flexible SSL Mode
RewriteEngine On RewriteBase / RewriteCond %{HTTPS} !=on RewriteCond %{HTTP:X-Forwarded-Proto} !https RewriteCond %{HTTP_HOST} ^example\.com$ [OR] RewriteCond %{HTTP_HOST} ^www\.example\.com$ RewriteRule .* https://example.com%{REQUEST_URI} [R=301,L]
@vital-tech-results
vital-tech-results / change next of button script.js
Last active May 18, 2023 18:57
example of how to change the text of the "Next" button
<script type="text/javascript" defer>
window.addEventListener('load', function(event) {
let myPrevious = document.querySelectorAll(".bg-gradient-primary")[0].innerText = "Previous changed"
let myNext = document.querySelectorAll(".bg-gradient-primary")[1].innerText = "Next changed"
return;
});
</script>