Skip to content

Instantly share code, notes, and snippets.

View Slinjez's full-sized avatar
🌴
On vacation

Mwangi Thiga Slinjez

🌴
On vacation
View GitHub Profile
@Slinjez
Slinjez / Google Maps Simple Multiple Marker Example
Last active July 19, 2017 13:29 — forked from parth1020/Google Maps Simple Multiple Marker Example
Google Maps Simple Multiple Marker Example
<!-- Edits by Mwangi Thiga-->
<html>
<head>
<title>Google Maps Multiple Markers</title>
<!--The 'sensor' thing could cause issues, so, -->
<!-- <script src="http://maps.google.com/maps/api/js?sensor=false" type="text/javascript"></script>-->
<script src="http://maps.google.com/maps/api/js?key=your api key" type="text/javascript"></script>
<!-- For more on api keys, pay this guy a visit: https://developers.google.com/maps/documentation/javascript/get-api-key -->
</head>
@Slinjez
Slinjez / index.html
Last active June 17, 2019 08:15
Nutanix Loading Screen
<div id="particles-background" class="vertical-centered-box"></div>
<div id="particles-foreground" class="vertical-centered-box"></div>
<div class="vertical-centered-box">
<div class="content">
<div class="loader-circle"></div>
<div class="loader-line-mask">
<div class="loader-line"></div>
</div>
<svg width="36px" height="24px" viewBox="0 0 36 24" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<div class="wizard">
<div data-title="Advert Basics" class="wizardPanel">
<h1>Advert Basics</h1>
<div class="row">
<div class="col-sm-3">Company</div>
<div class="col-sm-9"><input/></div>
</div>
<div class="row">
<div class="col-sm-3">Manager(s)</div>
<div class="col-sm-9"><input/></div>
@Slinjez
Slinjez / numbertowords.js
Created June 28, 2019 11:05
Convert numbers to English words
var th = ['', 'Thousand', 'Million', 'Billion', 'Trillion'];
var dg = ['Zero', 'One', 'Two', 'Three', 'Four', 'Five', 'Six', 'Seven', 'Eight', 'Nine'];
var tn = ['Ten', 'Eleven', 'Twelve', 'Thirteen', 'Fourteen', 'Fifteen', 'Sixteen', 'Seventeen', 'Eighteen', 'Nineteen'];
var tw = ['Twenty', 'Thirty', 'Forty', 'Fifty', 'Sixty', 'Seventy', 'Eighty', 'Ninety'];
function toWords(s) {
s = s.toString();
s = s.replace(/[\, ]/g, '');
if (s != parseFloat(s)) return 'not a number';
@Slinjez
Slinjez / numberstotext.js
Last active June 28, 2019 12:46
Convert numbers to words
var a = ['','one ','two ','three ','four ', 'five ','six ','seven ','eight ','nine ','ten ','eleven ','twelve ','thirteen ','fourteen ','fifteen ','sixteen ','seventeen ','eighteen ','nineteen '];
var b = ['', '', 'twenty','thirty','forty','fifty', 'sixty','seventy','eighty','ninety'];
function inWords (num) {
if ((num = num.toString()).length > 9) return 'overflow';
n = ('000000000' + num).substr(-9).match(/^(\d{2})(\d{2})(\d{2})(\d{1})(\d{2})$/);
if (!n) return; var str = '';
str += (n[2] != 0) ? (a[Number(n[2])] || b[n[2][0]] + ' ' + a[n[2][1]]) + 'hundred thousand ' : '';
str += (n[3] != 0) ? (a[Number(n[3])] || b[n[3][0]] + ' ' + a[n[3][1]]) + 'thousand ' : '';
str += (n[4] != 0) ? (a[Number(n[4])] || b[n[4][0]] + ' ' + a[n[4][1]]) + 'hundred ' : '';
@Slinjez
Slinjez / index.pug
Created January 28, 2020 07:40 — forked from oauo/index.pug
Footer blobs
div.main
div.footer
div.bubbles
- for (var i = 0; i < 128; i++) //Small numbers looks nice too
div.bubble(style=`--size:${2+Math.random()*4}rem; --distance:${6+Math.random()*4}rem; --position:${-5+Math.random()*110}%; --time:${2+Math.random()*2}s; --delay:${-1*(2+Math.random()*2)}s;`)
div.content
div
div
b Eldew
a(href="#") Secuce
@Slinjez
Slinjez / index.html
Last active January 28, 2020 07:56
Portfolio - Type help
<section class="hero is-fullheight">
<div class="hero-body">
<div class="container">
<div class="columns">
<div class="column is-3 is-flex">
<div class="column-child sidebar shadow">
<div class="sidebar-header has-text-centered">
<div class="photo"><img src="https://instagram.fdel25-1.fna.fbcdn.net/vp/5dcd7fd07ce899149702f81cd8155c23/5E6F9BC3/t51.2885-19/s150x150/71826152_1360562164120956_721707767340990464_n.jpg?_nc_ht=instagram.fdel25-1.fna.fbcdn.net" /></div>
<h2 class="header-name">Jatin Rao</h2>
<h5>Web Developer</h5>
@Slinjez
Slinjez / script.babel
Created January 28, 2020 08:01
todo list app with ES6
class Todo {
constructor({
title = "Todo App",
data = [],
onAdded = () => {},
onDeleted = () => {},
onStatusChanged = () => {}
} = {}) {
this.nodes = {};
this.title = title;
@Slinjez
Slinjez / css-goey-footer.markdown
Last active February 17, 2020 13:32
CSS Goey footer
@Slinjez
Slinjez / index.html
Created March 5, 2020 08:31
paper text 2
<textarea>This is the first line.
See, how the text fits here, also if there is a linebreak at the end? It works nicely.
Great.
</textarea>