Skip to content

Instantly share code, notes, and snippets.

@jremi
jremi / emoji-loop.js
Last active November 22, 2021 01:19
For loop to display emoji icon
var imgSource = 'http://fonts.voxmedia.com/emoji/unicode/1f4a9.png';
var txtSource = "shit ♥ ";
var valueInput = prompt("How many shit faces?");
for (var a = 1; a <= valueInput; a++) {
$("#container").add("div").attr('id', "image" + a);
$("#image" + a).append("<img class = 'emojiIcon' src=" + imgSource + ">");
$("#container").add("div").attr('id', "text" + a);
$("#text" + a).append("<h3 class = 'emojiNumber'>" + txtSource + a + "</h3>");
}
@jremi
jremi / arrayUniform.js
Created April 6, 2016 22:42
Small snippet to check if an array is fully uniform. All elements inside array must be same to produce true result. If they are different then the array is not uniform and false.
var falseTracker = 0;
isUniform(["2","2","2","2"]);
function isUniform(array) {
var firstElement = array[0];
array.shift();
array.forEach(function(element,index) {
if (firstElement !== element)
falseTracker = 1;
@jremi
jremi / Jest-TDD-ExportedNodeModule-Example.js
Created July 13, 2018 20:14
Basic example of using Jest for testing exported node module
/*
Filename ./myModule.js
*/
let a = (obj)=>{
return obj.x * obj.y
}
let b = (obj)=>{
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
<script src="https://code.jquery.com/jquery-3.1.0.js"></script>
<style id="jsbin-css">
div {
width:50px;
@jremi
jremi / dotdotdot-loader.html
Created October 25, 2018 05:19
Simple Vanilla JS - Dot dot dot progress loader
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>Dot loader</title>
</head>
<body>
Loading<span id="dots"></span>
</body>
@jremi
jremi / docker-compose.yml
Created March 9, 2019 04:56
Docker Compose config file (docker-compose.yml) for Wordpress + MySQL (MariaDB)
version: '2'
services:
wordpress:
image: wordpress:latest
ports:
- 8080:80
volumes:
- ./wp-content:/var/www/html/wp-content
@jremi
jremi / gist:360a10b70003729f925604c789f1d6c9
Created March 12, 2019 18:59
evee-sd data scrape event date format example test data
[Big Bay Boom!]
---------------------------
Jul 4, 2019 (original_date)
2019-07-04 (dates *start*)
[San Diego Crew Classic]
---------------------------
Apr 6 - Apr 7, 2019 (original_date)
2019-04-06 (dates *start*)
@jremi
jremi / vuejs-custom-filters-loader.js
Last active March 17, 2019 06:26
Vue.js - Global Custom Filters Loader Library
// [main.js]
import Vue from 'vue'
import filters from './customFilters'
// Load all custom filters into Vue.js
filters._helper.loadAllCustomFilters(Vue);
// Load specific filter "a la carte"
// Example: below loads "letterspace" only
@jremi
jremi / SuperSimpleHtmlTemplateLoaderExpress.js
Created March 18, 2019 21:29
Super Simple Static HTML template loader for Express JS
/*
Add your html files inside the folder ./html
For example
-- index.html
-- about.html
When the Express server starts it auto loads all of the HTML template data,
and automatically creates GET routes using the name of each html file.
@jremi
jremi / resume.json
Last active May 25, 2023 19:44
Resume
{
"meta": {
"theme": "elegant"
},
"basics": {
"name": "Jremi",
"label": "Full-Stack Developer",
"summary": "I’m a remote full-stack Javascript developer with a frontend focus utilizing Vue.js",
"website": "https://jzbg.dev",
"picture": "https://avatars.githubusercontent.com/u/5322988",