Skip to content

Instantly share code, notes, and snippets.

@JacobBennett
JacobBennett / fonts.js
Created August 8, 2019 14:22
List all font styles being used on the page
var ret={};
$('*').each(function () {
var str = $(this).css('font-family');
str = str + ':' + $(this).css('font-weight');
str = str + ':' + $(this).css('font-style');
if (ret[str] ) {
ret[str] = ret[str] + 1;
} else {
ret[str] = 1;
}
@JacobBennett
JacobBennett / Readme.MD
Last active April 29, 2019 13:54
Regarding Filesystems
@JacobBennett
JacobBennett / toInt.php
Created February 11, 2019 16:01
Handle the conversion of a float (decimal) to an integer.
<?php
function toInt($float)
{
// handle blank values
if (blank($float)) {
return 0;
}
// separate at decimal
@JacobBennett
JacobBennett / CheckboxIndicator.vue
Created November 12, 2018 20:34
Progress Indicator
<template>
<section>
<span class="circle" :class="{current: current, completed: complete}">
<span v-if="complete" class="fa fa-check u-icon__inner text-white"></span>
</span>
<small class="description"><slot></slot></small>
</section>
</template>
<script>
@JacobBennett
JacobBennett / clean-up-boot-partition-ubuntu.md
Created April 24, 2018 20:59 — forked from ipbastola/clean-up-boot-partition-ubuntu.md
Safest way to clean up boot partition - Ubuntu 14.04LTS-x64

Safest way to clean up boot partition - Ubuntu 14.04LTS-x64

Reference

Case I: if /boot is not 100% full and apt is working

1. Check the current kernel version

$ uname -r 
<div class="container">
<img src="http://endurancecompany.com/enduranceco.png" alt="">
<h3>
Our site is temporarily unavailable but you can visit us on <a href="https://www.facebook.com/EnduranceCo/">Facebook</a> or <a href="https://twitter.com/EnduranceCo">Twitter</a>. We’ll be back to normal soon.
</h3>
</div>
#text-block .flickr {
color: transparent;
text-shadow: white 0 0 1px;
-webkit-transition: text-shadow 0.2s ease-in-out;
-moz-transition: text-shadow 0.2s ease-in-out;
transition: text-shadow 0.2s ease-in-out;
}
@JacobBennett
JacobBennett / description.md
Last active May 6, 2017 05:23
Code Challenge

Code Challenge Premise

Find a point (x,y) on the permiter of a rectangle

the rectangle origin starts at some arbitrary x, y and is maxX wide and maxY high.


Solutions can be written in any lang, although I wrote mine in JS

@JacobBennett
JacobBennett / params.js
Created February 1, 2017 02:26
Parsing Get Parameters in JS
/*
* Params.js
*
* http://lecklider.com/2015/12/parsing-get-parameters-in-javascript.html
*
* Super simple parser of query string parameters.
* Creates a variable 'params' on the 'window' object.
*
*/
(function() {
@JacobBennett
JacobBennett / 0_reuse_code.js
Created December 19, 2016 16:57
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console