Skip to content

Instantly share code, notes, and snippets.

View borgateo's full-sized avatar
🎯
Focusing

Matt Borgato borgateo

🎯
Focusing
View GitHub Profile
@borgateo
borgateo / response.json
Created February 2, 2022 19:27
response from permissions-api
{
"search": {
"criteria": {
"scope": {
"simple": true,
"avatar": true,
"totalCount": true
},
"sortBy": "roleID",
"sortOrder": "desc",
{
"editor.tabSize": 2,
"editor.renderWhitespace": "boundary",
"editor.cursorStyle": "block",
"editor.fontFamily": "'Office Code Pro D', Inconsolota, Menlo, Monaco, monospace",
"editor.fontSize": 13,
"editor.formatOnSave": true,
"[javascript]": {
"editor.formatOnSave": false,
},
@borgateo
borgateo / random-colors.html
Created May 12, 2016 12:19
Hex random colors
<!DOCTYPE html>
<html>
<head>
<title>Math.floor(Math.random() * 16777215).toString(16)</title>
</head>
<body>
<script type="text/javascript">
var r = Math.random;
var c = document.createElement('canvas');
#!/bin/bash
set -e
# Note:
# run this script from the project folder
# `sh /path/delete-branches.sh`
# Some Colors
red=`tput setaf 1`
/* lazyload.js (c) Lorenzo Giuliani
* MIT License (http://www.opensource.org/licenses/mit-license.html)
*
* expects a list of:
* `<img src="blank.gif" data-src="my_image.png" width="600" height="400" class="lazy">`
*/
!function(window){
var $q = function(q, res){
if (document.querySelectorAll) {
@borgateo
borgateo / readingTime.js
Last active January 16, 2021 11:40
reading time
/*
** readingTime
** ===========
** Given a string, it returns the time a human needs to read it
** @param {String} text - the string to analyze
** @param {Number} wpm - words per minute
*/
function readingTime( text, wpm ) {
@borgateo
borgateo / RubyUtils.js
Created January 23, 2016 15:20
Ruby's String Utils: center, rjust, ljust in JS
/*
* Ruby's String#center, String#rjust, String#ljust
*
* https://jsfiddle.net/6v0bpffm/
*/
function ljust( string, width, padding ) {
padding = padding || " ";
padding = padding.substr( 0, 1 );
if ( string.length < width )
@borgateo
borgateo / envelope.less
Last active August 29, 2015 14:27
simple CSS envelope
@background: rgb(31, 37, 50);
.envelope-icon {
position: relative;
display: inline-block;
width: 20px;
height: 16px;
margin-right: 10px;
margin-left: 25px;
vertical-align: top;