Skip to content

Instantly share code, notes, and snippets.

Jacob Bennett JacobBennett

Block or report user

Report or block JacobBennett

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@JacobBennett
JacobBennett / fonts.js
Created Aug 8, 2019
List all font styles being used on the page
View fonts.js
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 Apr 29, 2019
Regarding Filesystems
View Readme.MD
@JacobBennett
JacobBennett / toInt.php
Created Feb 11, 2019
Handle the conversion of a float (decimal) to an integer.
View toInt.php
<?php
function toInt($float)
{
// handle blank values
if (blank($float)) {
return 0;
}
// separate at decimal
View CheckboxIndicator.vue
<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 Apr 24, 2018 — forked from ipbastola/clean-up-boot-partition-ubuntu.md
Safest way to clean up boot partition - Ubuntu 14.04LTS-x64
View clean-up-boot-partition-ubuntu.md

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 
View index.html
<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>
View flicker-text.css
#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;
}
View description.md

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 Feb 1, 2017
Parsing Get Parameters in JS
View params.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 Dec 19, 2016
Here are some things you can do with Gists in GistBox.
View 0_reuse_code.js
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
You can’t perform that action at this time.