A vanilla JS fork of Lettering.js. Follow along in the tutorial video at https://gomakethings.com/converting-a-jquery-plugin-to-vanilla-js-lettering.js/.
Pass in a selector for the elements you want to run Vanilla Lettering.js on.
(function ($) { | |
/* Twitter Bootstrap Message Helper | |
** Usage: Just select an element with `alert` class and then pass this object for options. | |
** Example: $("#messagebox").message({text: "Hello world!", type: "error"}); | |
** Author: Afshin Mehrabani <afshin.meh@gmail.com> | |
** Date: Monday, 08 October 2012 | |
*/ | |
$.fn.message = function(options) { | |
//remove all previous bootstrap alert box classes | |
this[0].className = this[0].className.replace(/alert-(success|error|warning|info)/g , ''); |
import Vue from "vue"; | |
import App from "./App.vue"; | |
import "@/assets/tailwind.css"; | |
Vue.config.productionTip = false; | |
new Vue({ | |
render: h => h(App) | |
}).$mount("#app"); |
A vanilla JS fork of Lettering.js. Follow along in the tutorial video at https://gomakethings.com/converting-a-jquery-plugin-to-vanilla-js-lettering.js/.
Pass in a selector for the elements you want to run Vanilla Lettering.js on.
I hereby claim:
To claim this, I am signing this object:
### Keybase proof | |
I hereby claim: | |
* I am burnoutprojects on github. | |
* I am kamenos96 (https://keybase.io/kamenos96) on keybase. | |
* I have a public key ASAw1eKWxt-kA1dQcivXVcMPth0cx8N7IyskbEXpgFp2kAo | |
To claim this, I am signing this object: |
# IPv4 and IPv6 regex test | |
# source: https://ihateregex.io/ | |
# IPv4 | |
/(\b25[0-5]|\b2[0-4][0-9]|\b[01]?[0-9][0-9]?)(\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}/gm | |
# IPv6 | |
/(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))/gm |
Type | Interface |
---|---|
In typescript type is defined for a variable’s data type which means type declaration in typescript is used for declaring names of different types such as user-defined, built-in, or any other data types. | Interfaces are defined as the syntax for the class which provides a way to define entities. |
It uses the type keyword for defining new types. | It uses the interface keyword for declaring an interface. |
Types can be used for others like built-in types, tuples, etc. | The interface cannot be used with other types of declaration. |
Types cannot be extended and hence it does not support classes. | Interfaces can be extended and it supports classes. |
In Typescript, union types can contain one or more types. | In typescript this feature of union types is not supported as we cannot create a union interface by combining two types. |
const curYear = new Date().getFullYear() | |
const start = new Date(curYear, 0, 1); | |
const end = new Date(curYear, 11, 31); | |
const today = new Date(); | |
const percent = Math.floor(((today - start) / (end - start)) * 100); | |
let bar = ''; | |
for (i = 0.5; i <= 10; i += 0.5) { | |
if ((percent / (i * 10)) >= 1.0) { |